Have you ever wanted to remove ads on posts belonging to certain categories only? Or wanted to remove ads on all your sponsored review posts?
Here’s the code to do it in WordPress:
<?php
if ( !in_category(15) && !in_category(23) && !in_category(14) && !in_category(20)) {
?>
Your ad code here
<?php } ?>
In the above code 15, 23, 14 and 20 are category IDs, replace them with the IDs of the categories you don’t want ads in.
I am currently using this code to remove AdSense and Kontera ads from my Blogging, Make Money Online, WordPress and WordPress Plugin categories. Thanks to Keith for the code.
![]()









This post is to reward regular commenters of this blog by linking good posts from their blogs and sending them some traffic. If you would like to get rewarded too, all you have to do is 





