Google Adsense code ignores if() statement?
-
Ola!
I got this adsense code in my single.php file, i want this to show on all of them except my homepage.
<?php if ( !is_home() ) { ?> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-8929775238275343" data-ad-slot="4535981711"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <?php } ?>
With this code it still shows up on my homepage. Weird thing is that when i put some random text in the if() statement it works like it should.
What am i missing?
Gr. Pils
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Google Adsense code ignores if() statement?’ is closed to new replies.