PHP code for excluding adsense from a certain page?
How can I prevent adsense ads to show up on a certain page? You see, I would like to exclude adsense from displaying on the About Us page on this website, but I'm not sure how to go about doing it...
I just had a look at my index.php file and noticed that it contained the following line of code:
<div><?php echo show_ad_camp_1(); ?></div>
I'm guessing this is why I keep getting the adsense block on each and every page? So could anyone please let me know what php code I should include to get the a开发者_如何转开发ds to show up on certain pages only?
You could try this:
<div>
<?
if (strpos("about-us", $_SERVER['REQUEST_URI']) === FALSE)
{
echo show_ad_camp_1();
}
?>
</div>
精彩评论