Hide ads on Specific Posts

Posted in: Newspaper
Post count: 34

Is there a way to hide ads on specific posts. Im using the ad setting that you guys created for posts. But on specific posts due to Adsense rules I dont want them to show..is there a code or something that I can hide specific post ids to not show advertisement?

Post count: 7909

Hi,

Unfortunately the theme doesn’t have an option to disable ads on specific posts, so if you want to block ads for specific posts you can do something like this – https://forum.tagdiv.com/topic/disable-inline-ads-for-categories/ but insted using category you can use is_single() function and paste post IDs in an array. You can find out more here about this function – https://codex.wordpress.org/Function_Reference/is_single
Or you can use css if you want to hide them:

.postid-xx .td-g-rec-id-content_top{
display: none;
}
.postid-xx .td-g-rec-id-content_inline{
display: none;
}
.postid-xx .td-g-rec-id-content_bottom{
display: none;
}

Here you can find post id – http://screencast.com/t/ogEeuvxCjI

Thanks!

Post count: 1

I just tried the CSS with post# to hide the ads.

But it didn’t work. I also tried the different .css sheets in case I put it in the wrong place.

Where exactly would you add that css in to hide the ads on individual posts?

Thank you!

Post count: 7909

Hi,

Please add css code in Theme Panel > Custom Css: http://screencast.com/t/ePHt2sb53c
Please provide a link so I can inspect this, also if you don’t use adsense code change g to a for example – .td-a-rec-id-content_top

Thanks!

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