Advertisement:

Author Topic: block AdSense from login help  (Read 120 times)

drkb

  • Newbie
  • *
  • Posts: 11
block AdSense from login help
« on: June 28, 2019, 11:11:06 pm »
I want to block adsense ads in the login field and publish an ad and register a new account because it is a warning in my account that these pages is contrary to Adsense how to prevent ads from appearing when I put the ad code appears on the site the the thrme is sakela

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: block AdSense from login help
« Reply #1 on: June 29, 2019, 12:57:09 am »
I want to block adsense ads in the login field and publish an ad and register a new account because it is a warning in my account that these pages is contrary to Adsense how to prevent ads from appearing when I put the ad code appears on the site the the thrme is sakela

Hi

Try the following:

Code: [Select]
<?php if ( !osc_is_login_page() || !osc_is_register_page() || !osc_is_publish_page() ) { ?><div>your google ad code goes here</div><?php  ?>
Regards

drkb

  • Newbie
  • *
  • Posts: 11
Re: block AdSense from login help
« Reply #2 on: June 29, 2019, 04:43:40 pm »
Is there an explanation of how to do and where to place this code in the script and what to do with this code

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: block AdSense from login help
« Reply #3 on: June 29, 2019, 10:15:05 pm »
Is there an explanation of how to do and where to place this code in the script and what to do with this code

In ‘sakela’ theme open ‘header.php’ in DreamWeaver and replace the code between line 147 and 150 as outlined below:

...replace the following

Code: [Select]
<!-- header ad 728x60-->
     <div class="ads_header">
    <?php echo osc_get_preference('header-728x90''sakela'); ?> </div>
    <!-- /header ad 728x60-->

...with the one below

Code: [Select]
<?php if ( !osc_is_login_page() || !osc_is_register_page() || !osc_is_publish_page() ) { ?>
<!-- header ad 728x60-->
     <div class="ads_header">
    <?php echo osc_get_preference('header-728x90''sakela'); ?> </div>
    <!-- /header ad 728x60-->
<?php  ?>

Best of luck!

drkb

  • Newbie
  • *
  • Posts: 11
Re: block AdSense from login help
« Reply #4 on: June 30, 2019, 02:19:13 pm »
First, I thank you for your interest. Second, I did as I said, but nothing happened, everything is still the same