Support » Plugin: Ad Inserter - Ad Manager & AdSense Ads » How-to disable Auto Ads Code in Header for Logged-in users?

  • Resolved heathcliff2013

    (@heathcliff2013)


    I have to insert"<script data-ad-client="ca-pub-0000000000000000" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>"in the HEADER section of Ad Inserter.

    This is needed for inserting the vignette ad.

    The problem is, I don’t know how to disable the header code for signed in users.

    How to disable auto ads in the Header section for members?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter heathcliff2013

    (@heathcliff2013)

    I think I have it but I’m not sure.

    1. Add code to block: |
    <script data-ad-client=”ca-pub-00000000000000″ async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script&gt;
    2. Insertion before post
    3. taxonomy, I select the user roles the block needs to be disabled for.
    4. place the shortcode [adinserter block=”1″ check=”exceptions”] this in the header.

    I tested it and I believe it works. Let me know if this is right?

    Plugin Author Spacetime

    (@spacetime)

    It should be easier to select Not-logged in users:
    https://adinserter.pro/documentation/additional-block-settings#insertion

    No need to check for exceptions in the shortcode.

    Thread Starter heathcliff2013

    (@heathcliff2013)

    The problem with your solution is, when someone sign up and not pick a subscription the ads will be disabled while not paying a small fee to support my work. So I have to manual pick the user roles.

    Why do you advice not to check the exceptions?

    Plugin Author Spacetime

    (@spacetime)

    If you are actually using individual post or page exceptions for thsi block then use it.
    Of course, you can use any user role.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.