As per Google Adsense Ad placement policy, it states that -
"Publishers are not permitted to place ads on any non-content based pages like thank you, error, log in, or exit pages. "
More info here:
https://support.google.com/adsense/answer/1346295?hl=en#Ads_on_non_content_pagesBender theme and Bender_Black Theme has "Ads Management" in Theme Settings, using which we can place Google Adsense on various regions such as Header, Search Results Page Top & Bottom, Sidebar etc. This provision is very convenient instead of placing ads manually in php files.
But ads (placed in Header) also apears on Login, Register and also on error pages, which may cause issues with Google Adsense later.
I have the following code in header.php
<?php if( osc_get_preference('header-728x90', 'osclasswizards_theme') !=""){ ?>
<div class="ads_header ads-headers"> <?php echo osc_get_preference('header-728x90', 'osclasswizards_theme'); ?> </div>
<?php } ?>
and
user-login.php includes the header.php
osc_current_web_theme_path('header.php');
I want to continue to use the default ADs Management feature. But how to disable Ads from appearing in login, register pages etc.?
We can disable content from displaying using CSS code. But in this case, I can't think of selectively disabling depending on page type
Any help is appreciated.