Hi, I am looking option to turn off header Ad in some post. like the link below.
https://apnews.com/ada473bb98a24bf09e918c44c2300fc6?utm_campaign=SocialFlow&utm_medium=AP&utm_source=Twitter&utm_medium=AP&utm_source=Twitter&utm_campaign=SocialFlow&utm_medium=AP&utm_source=Twitter&utm_campaign=SocialFlow&utm_medium=AP&utm_source=Twitter&utm_campaign=SocialFlow
this is my website link below but its show with header ad.
https://nexttvc.com/first-female-elected/
-
This topic was modified 7 years by
nexttvc.
Hi,
The theme doesn’t have such a setting, the ad will be displayed permanently. Usually this could be done with CSS but in case of Adsense ads Google will not allow them to be hidden with CSS.
You could create a condition in the header template 6 file you are using. Something liks in this topic
– https://forum.tagdiv.com/topic/my-header-ad-are-not-in-the-middle-of-the-page/
The condition would be – if this is not post IDs -> show the ad
– https://www.screencast.com/t/oL6gb45vq
So the ad will not be loaded for those posts.
Or you could try using a plugin such as Adrotate, I believe that has such settings
– http://www.wpbeginner.com/plugins/how-to-manage-ads-in-wordpress-with-adrotate-plugin/
– https://ajdg.solutions/manuals/adrotate-manuals/
Thanks
Thank you for your kind reply but I try to add this code that you sent me screen shot but my website goes down and show this msg.
Parse error: syntax error, unexpected ‘{‘, expecting ‘(‘ in /homepages/12/d539825421/htdocs/clickandbuilds/NextLifeStyleTV/wp-content/themes/Newspaper/parts/header/header-style-6.php on line 41
so I replate the backup one and now the website is back.
Please, can you just put this request in your next update theme that in a post like you have other options below so Add options for Ads off on any page or post we want?
Also when you will go to fix the Tagdiv Mobile plugin issue? right now I can’t use the plugin because once I activate the plugin my save theme changes options stuck. so i switch off the tagdiv mobile plugin and all works fine.
That could mean the syntax of the code you are entering is not valid, seems to mention an accolade on line 41. You could try again, make sure the code is valid as in my example
– https://www.screencast.com/t/BClxC9xDE
Maybe this will be set as an option for the header builder that is being developed at the moment, I can’t say for sure.
That is not quite right, I will give you the line of code and you can replace it on your end. Here it is
– https://pastebin.com/tuWMTefd – http://prntscr.com/me46vx
Be sure to enter the IDs of the posts in the code, those can be seen while hovering their names in the posts screen – http://prntscr.com/me47mp