-2

The reason i wanna create this because I’m getting Google Adsense violation on the theme because the 404 Page is showing ads, which rests in privacy violation for showing ads on empty places.

Can you tell me, How to hide/Disable Google Adsense Page Level ads on WordPress Theme’s 404 Page ?

My website is Theislamicinformation.com

  • 1
    I'm voting to close this question as off-topic because it seems to be a request for general/broad SEO advice. – Toby Nov 29 '18 at 20:02

1 Answers1

0

If you can edit the template you could check if the current active page is a 404 and use a condition to prevent the display of the adSense block through is_404()

If not, you could try to display ad only through widget and be sure that the 404 page template don't have the widget area with the ad in it.

<?php if(!is_404()); ?>
  <div id="myAd"></div>
<?php endif; ?>
Rambobafet
  • 139
  • 1
  • 5