Friends,
I need to resolve an issue before I start using the Newspaper. I Need to override the Adsense code in a particular category Which groups the posts sensitive to Google’s policy. The intention is que the Adsense banners are Replaced Within the posts in this category by other code of any banner whatsoever. In my old theme I used the following code:
<? php wp_reset_query (); ?>
<? php if (! in_category (‘sexy’)) {?>
<! – ADSENSE CODE BANNER (.. Ads field) ->
<? php}?>
<? php if (in_category (‘sexy’)) {?>
<! – BANNER SUBSTITUTE CODE ->
<? php}?>
I would like to know Which files do I enter this code for each field of the theme Ads tab.
Thank you in advance for your help!
Hi,
You need to edit td_module_single_base.php and block the article ads – http://screencast.com/t/5ZGQBXqA4W
Thanks!
Alin,
I made the change in file indicated of the according to your guidance, But not worked.
I put in “fashion” category as a way to test through the demo content, but not blocked Adsense banners in this category.
I hope this has some other solution
I wait for your help.
Thanks
Hi,
Please add category slug name there – http://screencast.com/t/Rh3kTxST as I have checked again this and it is working fine, you have to add this code for each article ad (top, inline, bottom) – http://screencast.com/t/fODHijmyWxj – http://screencast.com/t/Vheples1T2t
and !in_category('new-look-2015')
I suggest to get someone to help you if you don’t have basic php experience as we cannot provide any type of custom work at this time as we work hard on development, updates and support.
Hope this helps!
Now it worked. Thanks!!
I think the mistake was to try to apply through the theme child.
Could you tell me how I can apply the same scheme for the ad sidebar, please?
Hi,
Unfortunately this is not an easy task and you will need custom work to achieve this. I suggest to hire a professional to do this for you as we cannot provide any type of custom work at this time.
Thanks!