Disable Adsense Ads on Specific Posts

Posted in: Newspaper
Post count: 11

Being a News & Media website, we often have to cover sensitive topics which are against Google Adsense policies. Despite being the No. 1 News theme in the market Newspaper lacks the functionality to block ads on specific posts. Please consider the case in your future updates.

Is there any other way around to do so(code or anything else)?

Thanks.

Post count: 118

Hi @ground-zero,

I use the following to block ads by category:

.category-miscellaneous .td-a-rec, .category-miscellaneous .td-g-rec{
display:none;
}

Where “miscellaneous” is your category name.

This hides Google ads (td-g-rec) and all other ads (td-a-rec) from displaying on inline and sidebar placements, but does not hide header and footer ads.

Post count: 65

You can use Adrotate plugin to achieve what you want.

You will need to create a category where you don’t want ads to show, then just de-select that category from all the groups you set up.

The result will be no ads anywhere on that page or post.

Post count: 260

I use quick adsense and its easy to hide ads on specific posts

Post count: 11

Hi stuartmasson,

I am aware of that CSS code but that’s against the policy of Adsense. The code will only hide the ads and will not stop the ads from rendering.

Hi Taco&co and ing Geek,
As of now, I am using Advanced Ads plugin which gives me the functionality to block ads on specific posts.

The only issue I am facing now is with the mobile header ad.
When I use a Advanced ads shortcode for Google ads, header ad is not displayed on mobile and is giving me an error:
No slot size for availableWidth=0

So, I am wondering is there any piece of code that can help me remove the error like setting the min width of header ad division?

Post count: 11

You can check the error @ http://www.groundzeroweb.com

Post count: 65

Are you using a responsive only ad, rather than a specified size?

I can’t comment directly with the plugin you’re using but with adrotate I would put the shortcode in the header spot and then use the themes device size settings to set the container width.

I only used the mobile theme for a week though and swapped back to the desktop version.

Post count: 11

Yes, I am using responsive adsense code only and putting the shortcode generated by plugin in the Theme’s header ad spot.

Btw, how exactly can I disable ads on specific categories via Adrotate plugin?

Post count: 33

Hello @stuartmasson,

I tried code, and works so good!

I’ve a big problem in really, because I’m using WP Customer Area (intranet), and ad shows in all files, pages and conversations… 🙁

Whan could I do?

Thanks a lot of! 😀

  • This reply was modified 9 years by Matías.
Post count: 118

I don’t know and my coding skills are rubbish – I found out the above by searching through these forums! (and I don’t work for tagDiv).

I am currently trialling the Ad Inserter plugin, which allows you to enable/disable ads on specific posts and for specific devices.

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.