February 8, 2012

Infomasi Social Media dan Tip Trik Online

How To : Insert Adsense Code into Single Post in Thesis Themes


Advertisements

SocialBlogr is running on Thesis Theme now, it’s the best SEO friendly WordPress theme ever. But, Hybrid is also great for alternative if you don’t have extra budget. Ok, Thesis is a framework, so we couldn’t manage it like a ordinary WordPress themes. Thesis has so many hook inside of the framework, there are specific functions to control each section in the header, body and footer. To insert adsense code into Thesis themes we have to follow the Thesis’s rules.

All addition functions should be inserted into custom_functions.php. We need to insert the adsense code into thesis_hook_before_post and thesis_hook_after_post. Don’t worry, you don’t need to search for the hooks manually. Install the Thesis OpenHook plugins, use it to search and insert your adsense code.

thesishook How To : Insert Adsense Code into Single Post in Thesis Themes

After you install Thesis OpenHook plugins, go to Thesis OpenHook under Appearance menu, then search for thesis_hook_before_post, and insert the following code :

<?php if (is_single()) { ?>

[Your Adsense Code Here]

<?php } ?>

thesishook2 600x221 How To : Insert Adsense Code into Single Post in Thesis Themes

Also insert that code to thesis_hook_after_post. And don’t forget to check the “Execute PHP on this hook” option. You can see the result in this post.

Happy hacking.. icon biggrin How To : Insert Adsense Code into Single Post in Thesis Themes

Related posts:

  1. Google Adsense Sandbox Tools
  2. Fake Google Adsense Income!
  3. How To : Use QR Code on BlackBerry [Video]
  4. How To : Edit Footer on Genesis Themes
  5. How To : Add Facebook Like Button to Blogger Post
Ngonoo - Technology & Social Media Updates
Post comment as twitter logo facebook logo
Sort: Newest | Oldest