Support » How-To and Troubleshooting » Hide/ Exclude Adsense Ads Sidebar Certain Page
4 years, 10 months ago
I know how to hide or exclude Adsense ads from a particular page. But I also do have Adsense ads on the sidebars of the same page. How do I hide the ads on the sidebars?
if the ads code is in a widget, consider using a plugin such as http://wordpress.org/extend/plugins/widget-logic/ or http://wordpress.org/extend/plugins/conditional-widgets/ or similar
Thank you Alchymth.
Then how do I hide more than one Adsense code from more than one page. What I presently do to hide one page is I use this code:
<?php if($post->ID != xxxx): ?>
<?php endif; ?>
<?php if( $post->ID != xxxx && $post->ID != yyyy && $post->ID != zzzz ): ?>
I use your second option and it works. Thanks. What about hiding Adsense for PAGE? I have two PAGES (Disclaimer & Sitemap).
I already posted the link to the ‘conditional tags’ chapter of the Codex – so you have all the neccessary information; try to apply the info and play with the possibilities.
if you need info for php if/elseif/else, and logical operators, please search the web for tutorials.
Alright, I’ll do that. Again a big thank you for your help.