Disable Ads on certain Post(s) in newsmag

Posted in: Newsmag
Post count: 48

Hi,
I am using newsmag and want to disable all the ads on certain post(s). Is there any code/condition i have to add somewhere to disable ad on certain post? I am using template 2 by the way but would love to get a solution that could be applied on any template.

Post count: 23312

Hello m0re,

If you want to hide an ad for a certain post you should use the post ID and a custom CSS for this ad, like the code below:

The code is ->

.postid-147 .td-a-rec, .postid-147 .td-g-rec{
display:none;
}

The result is here -> http://screencast.com/t/tz610oCpC
Notice that the .td-g-rec class is only for a Google Adsense AD and .td-a-rec for other ads.

If is not what you mean, please provide more details so I will be able to provide a more accurate response.

Thanks for the message!

Post count: 48

Thank you for responding. Does this code stop the AdSense Code placeholder from loading or just display none because this way it might violate the Adsense policy. Can we do it through PHP code?

Post count: 23312

Hello m0re,

The above code only will hide the Ad. So, if you want to permanently remove it from an individual page, you should try using a plugin with this functionality, like as AdRotate plugin or this task can be made through coding skills. Also, if you want to display more levels in our theme and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for the message!

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