May
23
2011

How To Remove Google Adsense in Single Posts in WordPress

I have been looking for codes on how to remove Google Adsense since I need to remove the ads on certain posts where I’m doing product or site reviews. These reviews require that no other links or ads must be displayed or shown within the sponsored post/s.

After some “googling” and clicking links here and there then reading tutorials on how to remove Google Adsense in a Single Post in WordPress, I was lucky to find one that was so easy to follow. Let me share you the simple steps:

Open the single.php file within your theme and find your Google Adsense code. Then use a div tag like this:

<div id=”nogoogleads”>Google Adsense Code </div>

 

Then save your single.php file by clicking the “UPDATE” button. And when you need to remove the adsense in a particular post, while typing your post content add this code anywhere in the content:

<style>#nogoogleads {display:none !important;}</style>

If you’re done with your post, save it and that’s it! Now, try to check your post and notice that Google Adsense is not showing in that particular post.

Source: http://blogaboutyourblog.com/2009/02/19/removing-google-adsense-in-single-posts/

<img src=”http://i54.tinypic.com/2cyo4yd.jpg” border=”0″ alt=”remove adsense code” width=”181″ height=”78″ />
<p style=”text-align: center;”> 

<img src=”http://i55.tinypic.com/flhk69.jpg” border=”0″ alt=”remove adsense code in single post” width=”181″ height=”78″ /><p style=”text-align: center;”>

About the Author:

Praning5254 is an insomniac who started blogging since 2008. She is an educator and a Clinical Instructor offline, who has the passion for gadgets and other technology-related stuffs. Online, she maintains several blogs of various niches, which depicts her passion for technology, health, food, movies, books and other interesting stuffs.

1 Comment+ Add Comment

  • Doesn’t work for me! Are there other solutions?

Leave a comment