Best 2 Know

The Ultimate Blogging Resource

  • Advertising
  • WebHosting
  • Contact Us
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
  • Browser
    • Firefox
    • Google Chrome
  • Google
  • Internet
    • Facebook
    • Twitter
  • Thesis
  • Windows
  • WordPress
    • WordPress Themes
    • WordPress Plugins
  • More
    • Linux
    • Review
    • Solutions
    • Announcements

How to add Adsense in thesis

Thesis is a great framework which is been recommended by many of the top bloggers and SEO guru’s. Thesis uses hook’s to define and create its theme therefore its bullet proof. you can get list of Thesis Hooks here , Now using those hooks only we are going to add Adsense/Ads in thesis theme.

How add Adsense/Ad below post title in thesis

We are going to use thesis_hook_before_post this Hook adds the content before the post content.

Lets get started :

  1. Login to your WordPress Dashboard
  2. Navigate through Thesis >> Custom File Editor
  3. Select custom_functions.php
  4. In custom_functions.php add the below code :
    function before_post_ads() {
        if (is_single()) { ?>
        Your Ad Code Here !
       <?php }
        }
     add_action('thesis_hook_before_post', 'before_post_ads');

    function before_post_ads() { if (is_single()) { ?> Your Ad Code Here ! <?php } } add_action('thesis_hook_before_post', 'before_post_ads');

  5. In the above code replace on 3rd line replace “Your Ad Code Here !” with your Google Adsense Code
  6. Now Just save it

This will Place the Ad after the post title.

How to Place the Ad after the post content

to Place the Ad after the post content use the below code :

function after_post_ads() {
    if (is_single()) { ?>
    Your Ad Code Here !
   <?php }
    }
 
    add_action('thesis_hook_after_post', 'after_post_ads');

function after_post_ads() { if (is_single()) { ?> Your Ad Code Here ! <?php } }add_action('thesis_hook_after_post', 'after_post_ads');

Hope you like it, will be waiting for your feedback.

Subscribe via Email

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to print (Opens in new window) Print
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to email a link to a friend (Opens in new window) Email

Related

March 31, 2011 Ritesh Sanap Thesis Customization Thesis, Thesis Customization

Comments

  1. janet walker says

    April 24, 2011 at 6:49 am

    Thank you for sharing this code for adding adsense. I have found others sharing a code and yours was the simplest and shortest to use an worked straight away.

    Reply
    • Ritesh Sanap says

      April 24, 2011 at 11:33 am

      Janet ,
      I m glad that you find out helpful

      Reply
  2. Kunal says

    May 27, 2011 at 11:06 am

    No really it’s was a fantabulous post….

    I applied it… :) thankxx for sharing your knowledge..

    Reply
  3. Carlos says

    December 31, 2011 at 8:41 pm

    Thanks! I can now delete another plugin.

    Reply
  4. Tom says

    January 15, 2012 at 9:43 am

    I haven’t tried it but it looks like it’s just what I wanted.

    Thanks!

    Reply
  5. jon says

    January 22, 2012 at 7:17 pm

    HI

    I entered the last bit of code for after the post ad placement but now my site is showing blank white pages, even when i attempt to use my WP admin it just appears blank.

    I clicked back in my browser and deleted the code but this isnt doing anything.

    Any help would be great!

    Reply
  6. jon says

    January 22, 2012 at 7:27 pm

    I have just uploaded a fresh copy of custom_functions.php.

    Is there a reason why it would have made the site go blank? I put the code at the end of the custom_functions.php file, is this wrong?

    thanks

    Reply
    • Ritesh Sanap says

      January 22, 2012 at 7:30 pm

      Hello Jon,
      I guess you might have done some sort of mistake, or their might be some other things that are conflicting.

      Reply
  7. Rob says

    April 25, 2012 at 12:21 pm

    Currently, I’m using a plugin to display a 335×280 Google ad on the homepage right below the post title (view http://www.LiveLifeHappy.com). Is there anyway to display this ad using the thesis hook plugin? The issue I had was 4 of the same ads displaying right under each teaser posts. I just want one to display.

    Reply
    • Ritesh Sanap says

      May 9, 2012 at 1:44 pm

      Yes, you can display ads using Thesis Hook Plugins also

      Reply
  8. Mani says

    May 28, 2012 at 7:03 pm

    Now i have successfully added Chitika ads after I followed your tutorial.

    Reply
  9. Rohit Agarwal says

    August 15, 2012 at 2:06 pm

    Thank you to write this post… It will help me to adsense to thesis.

    Reply
  10. Technology says

    September 22, 2012 at 11:29 pm

    You just made my day bro, i was really tensed and tried 6 to 7 plugins. finally done it. thank love u :)))))

    Reply
  11. aries says

    October 25, 2012 at 11:54 am

    Excellent…., thank for your share

    Reply
  12. vinodh says

    December 16, 2012 at 9:02 pm

    I want to know the places (hook names) that I need to insert adsense in thesis so that my revenue is maximized .

    regards

    vinodh

    Reply
    • Ritesh Sanap says

      December 16, 2012 at 11:29 pm

      Well it is believed that Ads placed near Posts are always highly targeted, so the above codes tell you regarding 2 hooks before post and after post, well other then that if you want to add, then do a research regarding were your visitors click mostly and add a Ad at that spot, this will maximize your Income

      Reply

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation

Previous Previous post: How to disable Rotator in thesis
Next Next post: How to move Thesis Navigation bar below Header

Currently Trending

  • How to download Specific parts of YouTube videos
    How to download Specific parts of YouTube videos
  • Windows Vista CD key
    Windows Vista CD key
  • How to retrieve my Demonoid username
    How to retrieve my Demonoid username
  • How to add Logo to Thesis theme
    How to add Logo to Thesis theme
  • How to Delete Feedbacks from JetPack Contact Form
    How to Delete Feedbacks from JetPack Contact Form
  • List Of All 255 Keyboard All Alt Key Codes
    List Of All 255 Keyboard All Alt Key Codes
  • h4x0r ( Hacker ) - Blogger Template
    h4x0r ( Hacker ) - Blogger Template

Get Latest post in your Inbox

Random Posts

How to add Separate Nav Menu for Categories in thesis

April 5, 2011 By Ritesh Sanap Leave a Comment

Google Voice invites for students

May 14, 2010 By Ritesh Sanap Leave a Comment

WordPress Asking for FTP details every time while upgrading

March 4, 2011 By Ritesh Sanap Leave a Comment

Certain Websites are Slow in Vista

October 25, 2010 By Ritesh Sanap Leave a Comment

Find out what a Website is built with – Wappalyzer

September 20, 2013 By Ritesh Sanap Leave a Comment

WordPress

HTTP2 Server Push for W3 Total Cache Minify plugin

August 17, 2016 By Ritesh Sanap 5 Comments

How to Disable Emojis in WordPress

January 6, 2016 By Ritesh Sanap Leave a Comment

JetPack Related posts and Sharing not working with NGINX

November 10, 2015 By Ritesh Sanap Leave a Comment

Simply Pure – WordPress Theme

November 2, 2014 By Ritesh Sanap 2 Comments

Advanced What should we Write about next? – WordPress Plugin

July 28, 2014 By Ritesh Sanap Leave a Comment

How to Disable Self Pingback or TrackBack

January 16, 2014 By Ritesh Sanap Leave a Comment

BlueStrap – WordPress Theme

January 1, 2014 By Ritesh Sanap 15 Comments

How to Create Multiple Excerpts in WordPress

December 24, 2013 By Ritesh Sanap Leave a Comment

How to Disable Auto Update in WordPress

November 21, 2013 By Ritesh Sanap Leave a Comment

How to Delete Feedbacks from JetPack Contact Form

November 19, 2013 By Ritesh Sanap 9 Comments

Recent Posts

  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • How to show hidden files and folders in Mac OS X
  • How to Disable Emojis in WordPress
  • Canva – Online Photo Editor
  • JetPack Related posts and Sharing not working with NGINX

Archives

Recommends

  • DigitalOcean – Cloud Hosting
  • Dropbox – Cloud Storage
  • Elegant Themes – WordPress Themes
  • LastPass – Password Manager
  • Like us on Facebook
  • Follow on Twitter
  • +1 on Google
  • Subscribe via Email
  • RSS Feed

© 2025 Best 2 Know · All Rights Reserved · We ♥ DigitalOcean