Bookmark and Share

One of the first things a blogger learns right after writing and posting articles is, without any doubt, how to place ads in his blog in order to get some revenue and collect some money to pay those little expenses which are involved in managing a blog. The second important thing a blogger should also learn and know is that, if he loads his blog with too many ads, readers will never click  them because they will become aware that the blog is not aiming to offer news but just gather money for its owner. As a general rule ads (above all those ones which are fully configurable such as Google Adsense) have to blend in the article and blog’s theme in order not to look too obtrusive to readers.

Another nice trick is to remove certain ads from those places within a blog which are already full of different ads or eliminate ads from certain categories which contain, for example, sponsored reviews. Whatever the reason, if you want to eliminate ads from your categories, here is a nice piece of code which may help you:

if ( !in_category(15) && !in_category(23)) {
Insert your ad banner or adsense code here
<?php } ?>

As you see, the code above, will remove advertisements from the category number 15 and number 23. Of course you have to replace those numbers with the ones belonging to the catgories you want to make ads-free. If you are at loss about how to find out which numbers stand for your categories, here is a quick tutorial which can help you.

Source: thoushallblog.com

Related Articles Latest Articles

3 Comments to “How to remove Advertisements from Categories within your blog”

  1. HaryantoBlog Says:

    How remove ads if on sidebar in certain category?

  2. Web Talk Says:

    Hey! Thanks for commenting on my blog! I follow yours almost on a daily basis! Great job!

  3. Blog for Beginners Says:

    You can also alternate the ads for each category using an if/else statement. Anyway for beginners, the above is sufficient to address the issue. Thanks for the shout.


    Blog for Beginners´s last blog post..Duplicate Content: Penalty or Policy?

Copyright © 2007-2017 | Sitemap | Privacy | Back To Top
Best screen resolution 1280x800 or higher.
Web Talk is best viewed in Firefox.