Add Google Adsense ads at the end of post in thesis

by Daniyal Hasan · 4 comments

Google Adsense is a main source of earning for all bloggers. I myself also earn from Google Adsense and I like it very much. It is very easy to place Adsense ads anywhere. Thesis theme is the best theme and I also love it very much. It is best WordPress which I have ever used. So In this tutorial I will tell you all how to place ads at the end of your posts.

How to place Adsense ads at the end of post in thesis

This is very easy to place Google Adsense ads anywhere. You can customize it via hooks and in this work, you will make some enjoy also. Here is the example of placing Adsense ad at the end of post in thesis.

This looks like the above images. And it is very good and this increase our revenue also. So for adding this adsense ad after posts is very easy. You just need to put some codes in your thesis custom_functions.php.  First of all go to Thesis tab→ Custom File Editor→Select Custom_functions.php file. Now copy codes provided below:

function after_post_ads() {
 if (is_single()) {?>
 <script type="text/javascript"><!--
 google_ad_client = "ca-pub-xxxxxxxxxxxxxxx";
 /* Your Ad Name */
 google_ad_slot = "xxxxxxxxxx";
 google_ad_width = 468;
 google_ad_height = 60;
 //-->
 </script>
 <script type="text/javascript"
 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
 </script>
 <?php }
 }   add_action('thesis_hook_after_post', 'after_post_ads');

Above codes you have to copy in custom_functions.php . Just change codes which are in re color with your own code. If you want to put similar ad provided in the picture just create a ad unit 468*60. Now you are done. After creating an ad unit this will take 20 minutes to show ads on the site.

Also read   Add Google Adsense ads after post title in thesis.

If you have any query just comment here …

Enjoyed this article?
Then subscribe us here by just filling your email.
We hate spam just as much as you

Article by Daniyal Hasan

Daniyal Hasan Founder and CEO of RockingTricks.com. He is from India and is a passionate blogger who writes about Social media,Technology,affiliate marketing. You can read more here.

Daniyal has written 37 awesome articles.

{ 4 comments… read them below or add one }

khalid zafeer January 2, 2013 at 11:50 pm

very nice brth nd u try ur best u may success in ur target this is my pray.

Reply

Daniyal Hasan January 20, 2013 at 1:19 pm

Thanks @Khalid for your valuable comment.

Reply

ARM July 2, 2014 at 12:16 am

Thanks for the tutorial. Can you write about adding adsense code at other positions too?

Reply

Daniyal Hasan July 8, 2014 at 3:46 pm

Hello ARM, I hope you really enjoyed this tutorial, soon we will process your request and add more posts regarding your query.
By the way you have nice blog.

Reply

Leave a Comment

Previous post:

Next post: