19.04.2010 in Home > Internet > Adsense > WordPress by Namit Gupta 6

Implement Google Adsense Section Targeting in your WordPress blog

Adsense Section TargetingEarlier I wrote about What is Google Adsense Section Targeting? in this post I’ll show you how you can implement it in your WordPress blog.

We need to do section targeting on pages where the Adsense Ads are displayed to show more specific content related Ads, for eg. Single/ Post Pages in WordPress.  To get effective results we must target post title and post content, and ignore sidebar and comments.

Procedure to Implement Adsense Section Targeting in your WordPress Blog

I have chosen the default WordPress Dashboard Editor to make changes but you can also do it via any FTP Editor.

1) Goto Appearance, click on Editor

adsense-section-targeting

2) You will see a list of files at the right side of the window. We’ll be editing three files namely single.php, sidebar.php and comments.php.

Note: Please make proper backups of these three files before continuing, so you can revert to original files later if you commit any error.

adsense-section-targeting

3) First we’ll edit single.php. Scroll down and look for “the_title();” and insert the following code before it:

<!-- google_ad_section_start -->

Then look for “the_content();” and insert the following code after it:

<!-- google_ad_section_end -->

Click on Update file.

adsense-section-targeting

4) Now we’ll put ‘ignore tags‘ to sidebar and comments. Goto sidebar.php and comments.php. Put the following line at beginning of code:

<!-- google_ad_section_start(weight=ignore) -->

and following line at the end of code:

<!-- google_ad_section_end -->

This completes the procedure. But It may take some time for the substantial results to appear. As it will only come into effect after the page is properly crawled by the Google bots.

Related Articles

  • http://www.greatindianblog.com Sandeep Soni

    This Post is great

    • http://www.theitechblog.com Namit Gupta

      Thanks Bhaiya, I am glad you liked the post.

  • Sagar Gholap

    Done! That was pretty easy to do. :)

    Thanks

    • http://www.theitechblog.com Namit Gupta

      Hey, now your Adsense will display more relevant ads to the targeted content, this will surely increase CTR. All the best. :-)

  • http://www.robertantwi.com/blog/about-robert-antwi Robert Antwi

    Its better to be more specific with that code. If you want a high ctr on your ad sense ads you need to gear the code to the words on the blog post that are more in-tuned with the overall want of the traffic coming to the post. Not tell it to look at the whole post, help Google ad sense out by telling it the keywords.

  • http://mrintech.com/ Mrinmay Bhattacharjee

    Thanks for the Article :) Just implemented it :)

    Really Useful :)