Stop Showing Ads on Pages & 404 Pages

Posted in: Newspaper
Post count: 73

How to stop displaying adsense ads on pages and 404 pages..??

Post count: 23312

Hello lethow,

Please notice that you can redirect the 404 page to another page from your website, like your homepage for example. For more information about this, you can refer to this topic here -> http://www.wpbeginner.com/wp-tutorials/how-to-redirect-your-404-page-to-the-home-page-in-wordpress/ and if you want to stop the displaying Adsense code you will have to remove the Adsense code from your Ads area or you can use the following code and place it in Theme panel->Custom CSS Area.

.td-g-rec {
display:none;
}

Hope this helps!

Thanks.

Post count: 73

I want to show the google ads on post only but not on the pages & 404 error….also not want to redirect….

In the old them what we do…we usually create an header-noADS files & footer-noADS files which are identical as footer.php and header.php and then we define in page.php & 404.php to stop showing ads on pages & 404 pages….

but i want to know if mobile theme is activated then we have to do it in mobile folder also..??

Post count: 23312

Hello lethow,

If you want to stop showing ads on pages and 404 pages, please try the code below and palce it in Theme panel -> Custom CSS area.

.error404 .td-g-rec, .page .td-g-rec {
display:none;
}

Thanks.

Post count: 73

Thanks Catlin!

We had added the code but its working on desktop only…please note that we had mobile theme activated but adding the same code in mobile theme custom code is not working…

Post count: 23312

Hi lethow,

Try the code below.

.error404 .td-a-rec-id-header_mob, .page .td-a-rec-id-header_mob {
display:none;
}

The result -> http://screencast.com/t/JvuYb4hovt

Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.