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:

  • Twitter
  • Facebook
  • Pocket
  • Print
  • Email

Related

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

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
  • Windows Vista CD key
  • You might also like this Widget for blogger or Related post widget
  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • h4x0r ( Hacker ) - Blogger Template
  • Embed Text Resizing Widget To Increase or Decrease The Font Size
  • ZooZooo - Vodafone Logos
  • How to Increase Dropbox upload speed
  • BlueStrap - WordPress Theme
  • How to download Subtitles from YouTube Videos

Random Posts

Make Your CD Write Protected

March 28, 2009 By Ritesh Sanap Leave a Comment

Hack passwords in Firefox

March 12, 2008 By Ritesh Sanap Leave a Comment

Chit Chat for Facebook

December 3, 2010 By Ritesh Sanap Leave a Comment

How to Make DNS Propagation Faster

October 24, 2010 By Ritesh Sanap 7 Comments

How to retrieve my Demonoid username

December 18, 2014 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

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

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.