Disable ads on certain post

Posted in: Newsmag
Post count: 40

Hi,

Is it possible to disable the ads for certain posts? We use some posts as advertorial for clients who pay for it – so it would be great te disable the ads for certain posts…

Hope you can help!

Sincerely, Niels

Post count: 6600

Hi,

Unfortunately that is not possible at the moment, the theme doesn’t have an option for that. You can hide them though on specific posts using custom css code or you can also use a plugin like Advanced Custom Fields and use this method to do it: https://forum.tagdiv.com/topic/function-to-hide-ads-and-function-to-show-author/
I will add this on our request list and we will consider it for future updates.

Thanks

Post count: 40

Hi Lucian,

Could you send me an exampple of custom css code that could do that? I would like to try!

Thanks!

Post count: 7909

Hi,

You can use post id to hide them, take the post ID – http://screencast.com/t/qv7mnuY0L and use this custom css:

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

For inline ad there are also these classes .td-a-rec-id-content_inlineleft and .td-a-rec-id-content_inlineright

Hope this helps!

Post count: 40

.postid-32766 .td-a-rec-id-content_top
{ display: none; }
.postid-32766 .td-a-rec-id-content_inline
{ display: none; }
.postid-32766 .td-a-rec-id-content_bottom
{ display: none; }
.postid-32766 .td-a-rec-id-content_inlineleft
{ display: none; }
.postid-32766 .td-a-rec-id-content_inlineright
{ display: none; }

I tried above code, post id is correct but the ads are still showing. What am i doing wrong? Thanks!

Post count: 7909

Hi,

Please provide a link so I can inspect this and provide an accurate solution.

Thanks!

Post count: 40
Post count: 7909

Hi,

If you have adsense the class is changed from .td-a-rec-id-content_top to .td-g-rec-id-content_top Just change a with g
Please try this custom css: http://screencast.com/t/0gfJDcnswihttp://screencast.com/t/m1d99QccEI

.postid-32766 .td-g-rec-id-content_top, .postid-32766 .td-g-rec-id-content_bottom{
display: none;
}

Thanks!

Post count: 40

yes! Great! Works! Only the leaderboard is still visible – can we disable that one too?

THANKS FOR THE GREAT SUPPORT!

Post count: 40

Also, when I try it for a different page which has side bar ads adsense they still there – you have the codes for those too? Merci!

Post count: 7909

Hi,

I’m not sure what you mean with with leaderbord, if you refer to this – http://screencast.com/t/BlBO8pgXkM2 you can use this css: http://screencast.com/t/Zzu2Gcc5J

.postid-32766 .wp-image-32802{
display: none;
}

The class for the sidebar ad is .td-g-rec-id-sidebar

Thanks!

Post count: 40

Thanks. No, i mean the 780 px google banner next to the logo – that needs to disappear too! 🙂

Post count: 7909

Use this custom css: http://screencast.com/t/5KjGRxIq7U

.postid-32766 .td-g-rec-id-header{
display: none;
}

Thanks!

Post count: 40

Works! Thanks and have a great weekend!

Post count: 82

Is tagDiv thinking about enabling us to turn on/off ads, perhaps using shortcodes or something like that? That would be really useful.

Post count: 35

Is this possible with CATEGORY ?

Something like

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

Post count: 3343

Hi,

Is possible on a category page to, each category have a class on the body, see here: http://screencast.com/t/J9LaZon59

Thanks!

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