• Resolved Kunal Desai

    (@iamkunaldesai)


    Thanks for the wonderful plugin.

    <meta name=”generator” content=”AMP Plugin v1.2.0; mode=standard; experiences=website”>

    Below code does not remove AMP Generator Meta Tag

    / Remove AMP generator meta tag.
    add_action( 'amp_post_template_head', 'isa_remove_amp_generator_meta_tag', 2 );
    function isa_remove_amp_generator_meta_tag() {
        remove_action( 'amp_post_template_head', 'amp_add_generator_metadata' ); 
    }

    Could anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @iamkunaldesai The code looks fine to me. I assume you are using amp in reader mode? Check that it’s added to your active themes functions.php file.

    In addition it might be a typo, but in your comment also there needs to be an additional ‘/’

    // Remove AMP generator meta tag.
    add_action( 'amp_post_template_head', 'isa_remove_amp_generator_meta_tag', 2 );
    function isa_remove_amp_generator_meta_tag() {
        remove_action( 'amp_post_template_head', 'amp_add_generator_metadata' ); 
    }
    Plugin Author Weston Ruter

    (@westonruter)

    Why remove it? Keeping it helps us know who is using the plugin.

    Akki

    (@luckyankit)

    Hi, tried the code on Newspack theme. It didn’t work with the latest version of AMP plugin. Can you please provide the updated code? Using AMP on standard mode.

    • This reply was modified 5 years, 3 months ago by Akki.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Meta Generator Tag’ is closed to new replies.