views:

47

answers:

1

Hello,

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 ads to show up on certain pages only?

Thanks much in advance!

Slade

+2  A: 

You could try this:

<div>
<?
    if (strpos("about-us", $_SERVER['REQUEST_URI']) === FALSE) 
    {
        echo show_ad_camp_1();
    }
?>
</div>
Mike
I tried inserting this, but the ads are still showing. Thanks for taking to the time to reply!
Slade