Please go easy to me, I know little or nothing about PHP. I am trying to insert some code in my Wordpress single post template so that my adsense does not appear on a couple of posts, but still on the rest. This is what I have tried (remember, I know nothing about PHP!)... <?php if( $URI == 'this-is-a-url-string' || $URI == 'this-is-also-a-url-string' ) { ' '; } else { 'HERE IS MY FULL ADSENSE CODE'; }?> But it isn't working. What do I need to change for this to work? Any help will get green rep
Are you getting any errors? <?php if(!($URI == 'this-is-a-url-string' || $URI == 'this-is-also-a-url-string')) { ?> adsense code here. <?php }?> Code (markup): That should work much better for you.
you want adsense not to appear on some pages? am i correct? if yes.. store $uri in a array instead. !note: if not working echo $_SERVER['REQUEST_URI']so you will have an idea why