Hey guys, just wondering if you could tell me how I could remove Google ads from a certain page? For example, I have Adsense code installed in my NAVBAR template, so it shows the ad on all pages (wherever the navbar template is). I don't want the ad to show on certain pages like the "lost password" page, so how would I go about disabling the ad on that page?
Thanks! But, could you possibly explain a little better for me? I'm not too bright when it comes to this stuff. lol So I'm assuming I would change "THIS_SCRIPT" to the name of the file where I don't want the ads to appear? Also, if there were a few different pages I didn't want ads to run on, how would I do that?
Thanks! But, could you possibly explain a little better for me? I'm not too bright when it comes to this stuff. lol So I'm assuming I would change "THIS_SCRIPT" to the name of the file where I don't want the ads to appear? Also, if there were a few different pages I didn't want ads to run on, how would I do that?
Thanks again so much!
THIS_SCRIPT is a constant that stores the name of the script being run, for external scripts that define it. So, use Tim's code exactly as is to prevent ads from displaying on the login script.
If you wish to stop ads on multiple scripts, then you could use something like:
HTML Code:
<if condition="!in_array(THIS_SCRIPT, array('login', 'script2', 'script3',...))">
Your ad code
</if>
Replace 'script1' and 'script2' with the other scripts on which you want to prevent ads. You can list as many as you desire.
THIS_SCRIPT is a constant that stores the name of the script being run, for external scripts that define it. So, use Tim's code exactly as is to prevent ads from displaying on the login script.
If you wish to stop ads on multiple scripts, then you could use something like:
HTML Code:
<if condition="!in_array(THIS_SCRIPT, array('login', 'script2', 'script3',...))">
Your ad code
</if>
Replace 'script1' and 'script2' with the other scripts on which you want to prevent ads. You can list as many as you desire.