• Resolved Harry

    (@dibbyo456)


    Hi,
    I’m using shortcodes of to insert ads on pages. It works just fine.
    But I also use Better-AMP, they ads option, so I don’t want to use Ad Inserter on AMP pages.

    But Ad Inserter also inserting ads on those AMP pages, how can I put a stop to that?

    How to disable ad inserter injection to AMP pages regardless the settings?

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

    (@dibbyo456)

    Update: I made some codes to disable rendering of ad inserter shortcodes from AMP pages of Better-AMP plugin. I put this code on single.php of Better-AMP plugin.

    //Remove adinserter shortcode rendering from Better-AMP pages.
    add_shortcode('adinserter', '__return_false');

    I know, it’s not a good practice, looking for a better way to do this.

    • This reply was modified 7 years, 1 month ago by Harry.
    • This reply was modified 7 years, 1 month ago by Harry.
    Plugin Author Spacetime

    (@spacetime)

    By default Ad Inserter does not insert on AMP pages.

    To insert also on AMP pages you need to do one of the following:

    – use [ADINSERTER AMP] shortcode to define code for AMP pages
    https://adinserter.pro/adsense-ads#amp

    – enable insertion (of the same code) also on AMP pages (button Misc / tab Insertion)
    https://adinserter.pro/documentation#misc

    So you must be using some of these options.
    Please check.

    Thread Starter Harry

    (@dibbyo456)

    @spacetime Is there any way to show AI ad-blocking detection in html pages, which does not use wordpress?

    Plugin Author Spacetime

    (@spacetime)

    Not sure what do you mean by “show AI ad-blocking detection in html pages”.

    Ad blocking detection as used in Ad Inserter is a collection of scripts that try to detect presence of ad blocking.

    There are many such scripts around:
    https://www.detectadblock.com/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Ad Insert on AMP Pages.’ is closed to new replies.