Thesis theme is easy to use and we can customize the theme as our wish. Due to inbuilt of SEO optimization thesis users are increasing rapidly. If you are thesis users, this tutorial will helpful to display your Ads in your site. The Ads can be displayed header, footer, sidebar and inside of the post. In previous tutorial I explained about widgetized header, and widgetized footer. Now in this tutorial I explain about how to show your ads wigetized inside the post of thesis theme.
In this below video I explain the procedure.
How to show your Ads box inside the post of thesis theme?
To show your ads inside of the post follow this step below.
Add the below code into custom_function.php
/***BUILD AD WIDGET INSIDE POST paste in custom_functiom.php***/
register_sidebars(1,
array(
'name' => 'Post_AD',
'before_widget' => '<li id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>' )
);
function post_ad_widget() { ?>
<div id="post_ad">
<ul>
<?php thesis_default_widget(4); ?>
</ul>
</div>
<?php }
add_action('thesis_hook_after_post', 'post_ad_widget', '1');
/***POST AD WIDGET END***/
Add the below code into custom.css
/* CODE FOR CUSTOM.CSS FILE*/
.custom #post_ad ul.sidebar_list li.widget h3 {text-indent:0; padding-top:0.2em; color:#111; font-size:22px; font-family:georgia; background:none;}
.custom #post_ad ul.sidebar_list li.widget ul { }
- After adding this code, go to Appearnace select widgets.
- In the left side now you will see a new widget in the name of Post_Ad.
- Next, drag and drop the text widget from centre panel to post_Ad.
- Give the title, copy and paste the Advertisement code here. Then, click saves.
- Now refresh your site you will see the Ads inside of the post.
I hope this post will helpful to you. Do you have any question post in comment section below?
Related Tutorials:
- How to Place Ads Box Before The Post Title in Wordpress Thesis Theme?
- Widgetized Thesis Theme-Header, Content box and Footer
- How to Place Different Background Color for Each Sidebar Heading in Thesis Theme
- How to Create Wigetized Footer in Thesis Theme?
- How to add Social Bookmark Icons at Right Side of the Post in Thesis Theme









{ 37 comments… read them below or add one }
hi, its me once again.
im already subscribing to you via email but when i wanna subscribe via RSS..i clicked on the RSS icon and got this message:
Feed Address: http://feeds.feedburner.com/fourblogger
HTTP Error (Code) and Message: (404) Feed not found error: FeedBurner cannot locate this feed URI.
***Pascal please fix this ASAP.
keep up the good work..FourBlogger.com is the best Thesis Customization blog in the World!
Thanks aviation.. Now you can subscribe via RSS.
You can also subscribe to our youtube channel so that you won’t miss any tutorial.
/* testing multiple background */
body {
background-image: url(http://domain.com/wp-content/uploads/test.png);
background-attachment: fixed;
background-position: top left;
background-repeat: no-repeat;
}
hi, its me once again.
how could possible for CSS to put multiple image for background…like at the above code..i wanna it on top right because i want to images in my background…i search for it and people said to put html but it wont work at all…hope you can help me.
and..how to make the vertical line between content and sidebar more wider in Thesis theme..i want the border but a little bit wider.
It is possible to add multiple background image within the body section.
For this query, we will post soon..
how about ads in front page and other pages before the post title? its like welcome box so we address different ads in different pages.
Your team rocks, its amazing,
thanks for post.
Thanks Shivaraj.
I don’t use Thesis , i using one-theme 2.0 .But I have seen that thesis is “king of SEO” , maybe I’ll try use it on my blog . Thank for nice tip
Thanks for reading and commenting.
Pascal, Can this not be accomplished with Adsense plugin also?
But, yes i think using this method, one can shed off the load of one plugin
Can i implement this method to any other theme as well or this is only for thesis?
This for thesis theme only amandeep
Thanks it really helps me lot!!
Thanks Mr.Hyd.
Parse error: syntax error, unexpected ‘}’ in custom_functions.php
Give your site name, then only we can rectify this error.
Hi Pascal,
long time no comments..
i love your ads tutorial…
i just implement it into my website but the POST_AD, its nice with a simple adjustment and a drop of color however, it shows in front page. In another meaning, i want it to show in single page only which is if (is_single()) { but i dont know how to put this line into your code.
and another thing …the ads box shows a black circle at my left..check out my website..how to get rid of it?
thank you in advance, im waiting for another tutorial..
Hai aviationmy,
you should add
iffunction code after the function name like below codefunction post_ad_widget() {
if (is_single()) {
?>
enter your function here
<?php
}}
add_action(‘ ‘)
hi Suresh, thank you..it works..but how to removed the black dot? there’s a black dot at the left if you can see at my website.
hai,
In the custom_functions.php code after the first div ie)
div id="post_ad"replaceulwithul class="sidebar_list"the dot will be removedwhat do you mean by this? I also encounter the same error, please advise.
hai nugrinti,
Tell me clearly, what error you are facing?…
Thanks for the post. I was almost going to pay someone to do this for me, but i came across your post, and now i don’t need to spend money and can widgetize some things in thesis
hai chris,
You can widgetized any part of thesis theme with help of appropriate hooks…
I cant find the custom css file. Where is it?
hai,
check this path
login your wordpress admin
click on custom file editor under thesis options in left sidebar of the wp admin dash board.
here you have custom.css file.
or
by using ftp you can find css file
the path is
yourdomain.com/wp-content/themes/thesis/custom/custom.css
Thanks for your helpful blog. I think I followed your directions, but instead of my Google ads I’m getting a gray box that says… *
Default Widget
This is Sidebar 4. You can edit the content that appears here by visiting your Widgets panel and modifying the current widgets in Sidebar 4. Or, if you want to be a true ninja, you can add your own content to this sidebar by using the appropriate hooks.
—
I’ve placed the script from Google in the Text widget in Post_AD and saved it.
Do you have any suggestions?
Thanks again,
Kevin
hai,
go to your widget panel in appearance section of wp-admin. count the number of widget available from sidebar_1, sidebar_2 like this if you have already 3 widgets before post_AD. it will work. other wise count the number of available before
post_AD widget if it is two.
In the above custom_function.php code change thesis_default_widget(4) as thesis_default_widget(3) and save it. your add will appear.
If you have already 4 change it into 5. This will explained in video….
Hi Suresh,
Thank you so much. That was what I needed. It works now.
Hi, can u teach me how can i put widget after post?
Im so frust now.Please!
hai smith,
Follow the instruction give in the above post ..
which show the way to add widget below post..
Hello. Suresh, can u help to put featured content gallery to my site?
I want to put at my header.
hai Smith,
Install the wp-plugin ‘dynamic content gallery’
select the options available in the plugin..
You will get the featured content gallery..
Suresh:
hi any idea for placing mobile ads inside the post content ; adsense mobile ads
plz help me the code is
CGI/Perl v5.8
JSP v1.2
ASP v3.0
Hi you can put the mobile ads as per the Google adsense guidelines as you normally do in case text/image ads….
Have you pasted the whole code in comment? It looks like only part of the code..
If you have any links for Google adsense then give me…I will try to let you know how to do it.
Allow me to be another person to say this is an awesome and resourceful site
hey i am trying to add a widget above each teaser headline….how do you do that?????
hai ant,
Use the appropriate hook in custom function.php file. use the below hook..
thesis_hook_before_teaser_headlinedo you want to know the places where your hook appeared in webpage visit ‘before knowing about hooks’ part in the below tutorial.
http://fourblogger.com/how-to-use-hooks-in-thesis-theme/
{ 1 trackback }