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?. For more checkout our all Thesis theme tutorials..
Related Tutorials:
- How to Place Ads Box Before The Post Title in WordPress Thesis Theme?
- How to add Google Buzz Button inside post and Homepage of Thesis Theme
- How to Add Featured Post Inside Feature Box of Thesis Theme
- How to Add Banner Ads in Header of Thesis Theme
- How to Place Different Background Color for Each Sidebar Heading in Thesis Theme




{ 55 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 removedI don’t really understand this..It make me confuse…I just want to make the add box appeared in single post & not at the homepage…can U just give me the right code……
what 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/
I want to Build something very similar to the blue box on the page linked below.
http://www.designpublic.com/shop/inhabit/14520
on my website: http://www.apartmentdesignco.com on all the products page like this
would I want image or it is a box I can create via css
sorry for previous …The one link was not working …so I am posting another one…
I want to Build something very similar to the blue box on the page linked below.
http://www.designpublic.com/shop/inhabit/14520
on my website: http://www.apartmentdesignco.com on all the products page like this
http://www.apartmentdesignco.com/2010/apartment-furniture/indigo-slipper-chair
would I want image or it is a box I can create via css
Thanks
Hi amit,
Our thesis team totally move to our membershipsite fourbloggerclub. so nowadays we are solve any single thesis issue for $5 only. it is ok for you. send your requirements.
contact us via contact form
great tips…
Thanks
Hi, how can I add the add widget only at the single post?? Can you share with me the code… I don’t want the add box to appear on homepage of my blog….
Thanks………..
Hi pascal, BTW, thanks for this great tip.
Just want to ask if how can i move the position of the widget_ad?
I followed your directions exactly, and the Post_Ad widget shows up on my widget panel, and I have placed a text widget into it. However, when I view my site, I see a widget area that has a bullet in front of it, and 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.” This is clearly from Thesis.
I do not see a sidebar 4 on my widgets panel, and the text widget I placed in the Post_Ad widget area is not showing up at all.
Please advise, and thanks for the excellent tips.
Dave
Great post very useful – thanks very much.
Are you able to make the widget disappear from all pages, and only display on the blog posts themselves. I don’t want the widget to appear on all of my pages, only the posts.
I know you did mention an if statement above in the comments to do this, but it doesn’t give the exact code to be used for a person that is not a programming expert.
check out my site at http://ScottDudley.net to see what I mean
Scott
To diable or display widgets in certain parts, I have published recently a tutorial. CHeck it here. http://fourblogger.com/widget-logic-plugin-helps-to-hide-or-display-widgets/
absolutely brilliant – thank you very much for the awesome tutorials on this website
Scott
Well First of all thanks for your wonderful tutotials.I just put the code like you said in my site.It shows fine but it also took something that i put on the footer and it’s showing that on my 2 teasers.Any fix.(am using thesis Bold skin)
hai Lindarx,
It seems like default widget number problem.. In the above post I used
default_widget(4). Just go to you widgets section in wp-dashboard count the number of widget and use the next number for next widget. If total number of widgets are 5 then for post ad we should use 6. iedefault_widget(6)Just check this..
more details on creating widgets http://fourblogger.com/widgetized-thesis-theme-header-content-box-and-footer/
Thanks for the info,i found a plugin about the post one.But i surely will try the header widget…..Very nice tutorials,keep it up
.
Why post widget appear in Home page also .. I dont want it on home page
If it shows, then you can hide your widget easily..
can i know how to place ads below the posts