Learn Thesis Theme Fast to Build Unique and Beautiful Websites

  • Thesis Designer Guide is the fastest way to learn the Thesis framework.
  • A step-by-step guide walks you through all the essential things you need to know to become a Thesis design expert.
  • You don’t need to be a programmer to learn Thesis design.
  • The complete Thesis Designer Guide covers all the coding basics and tools needed to become a Thesis expert.

Learn Thesis Theme! Get Started Now!

How to Place Your Ads Inside the Post of Thesis Theme?

by in Thesis Theme Tutorials

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..

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)

Related Tutorials:

  1. How to Place Ads Box Before The Post Title in WordPress Thesis Theme?
  2. How to add Google Buzz Button inside post and Homepage of Thesis Theme
  3. How to Add Featured Post Inside Feature Box of Thesis Theme
  4. How to Add Banner Ads in Header of Thesis Theme
  5. How to Place Different Background Color for Each Sidebar Heading in Thesis Theme

{ 54 comments… read them below or add one }

aviationMY

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!

Reply

Pascal

Thanks aviation.. Now you can subscribe via RSS.

You can also subscribe to our youtube channel so that you won’t miss any tutorial.

Reply

aviationMY

/* 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.

Reply

Pascal

It is possible to add multiple background image within the body section.
For this query, we will post soon..

Reply

aviationMY

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.

Reply

shivaraj

Your team rocks, its amazing,
thanks for post.

Reply

Pascal

Thanks Shivaraj.

Reply

Blog tin hoc

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

Reply

Pascal

Thanks for reading and commenting.

Reply

Amandeep Singh

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 :D

Can i implement this method to any other theme as well or this is only for thesis?

Reply

Pascal

This for thesis theme only amandeep

Reply

Mr.Hyd

Thanks it really helps me lot!!

Reply

Pascal

Thanks Mr.Hyd.

Reply

picso

Parse error: syntax error, unexpected ‘}’ in custom_functions.php

Reply

Pascal

Give your site name, then only we can rectify this error.

Reply

aviationMY

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..

Reply

Suresh

Hai aviationmy,
you should add if function code after the function name like below code
function post_ad_widget() {
if (is_single()) {
?>
enter your function here
<?php
}}
add_action(‘ ‘)

Reply

aviationMY

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.

Reply

Suresh

hai,

In the custom_functions.php code after the first div ie) div id="post_ad" replace ul with
ul class="sidebar_list" the dot will be removed

Reply

Fety Ayu

I 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……

Reply

nugrinti

what do you mean by this? I also encounter the same error, please advise.

Reply

Suresh

hai nugrinti,

Tell me clearly, what error you are facing?…

Reply

Chris

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

Reply

Suresh

hai chris,
You can widgetized any part of thesis theme with help of appropriate hooks…

Reply

Sam

I cant find the custom css file. Where is it?

Reply

Suresh

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

Reply

Kevin

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

Reply

Suresh

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….

Reply

Kevin

Hi Suresh,
Thank you so much. That was what I needed. It works now.

Reply

Smith

Hi, can u teach me how can i put widget after post?
Im so frust now.Please!

Reply

Suresh

hai smith,

Follow the instruction give in the above post ..

which show the way to add widget below post..

Reply

Smith

Hello. Suresh, can u help to put featured content gallery to my site?
I want to put at my header.

Reply

Suresh

hai Smith,

Install the wp-plugin ‘dynamic content gallery’
select the options available in the plugin..
You will get the featured content gallery..

Reply

wilander

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

Reply

Pascal

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.

Reply

Nedlua

Allow me to be another person to say this is an awesome and resourceful site

Reply

ant

hey i am trying to add a widget above each teaser headline….how do you do that?????

Reply

Suresh

hai ant,

Use the appropriate hook in custom function.php file. use the below hook..
thesis_hook_before_teaser_headline
do 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/

Reply

Amit

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

Reply

Amit

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

Reply

Pascal

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

Reply

Sanbik

great tips…

Reply

Pascal

Thanks

Reply

Fety Ayu

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………..

Reply

paul

Hi pascal, BTW, thanks for this great tip.
Just want to ask if how can i move the position of the widget_ad?

Reply

Dave

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

Reply

Scott Dudley

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

Reply

admin

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/

Reply

Scott Dudley

absolutely brilliant – thank you very much for the awesome tutorials on this website :)

Scott

Reply

Lindarx

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)

Reply

Suresh

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. ie default_widget(6)
Just check this..

more details on creating widgets http://fourblogger.com/widgetized-thesis-theme-header-content-box-and-footer/

Reply

Lindarx

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 :D .

Reply

anuraag

Why post widget appear in Home page also .. I dont want it on home page

Reply

FourBlogger

If it shows, then you can hide your widget easily..

Reply

Leave a Comment

Previous post:

Next post:


Popular Tags:

    how can i put ads in video box, ads inside post, wordpress putting ads before page post title, placing ad below comments in blogspot, place google adsense on wordpress thesis, place ads inside the post, palce a eidget inside posting wordprss, next below post in thesis, insert mobile adsense inside posts, how to show ads on video