• Resolved rafael1338

    (@rafael1338)


    Hi!

    The AMP version of my site is having problems in Google Search Console, due to this code snippet mentioned below.

    Several pages have been showing errors like:

    <!--
    Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/
    
    Object Caching 222/247 objects using disk
    Page Caching using disk: enhanced (Requested URI contains query) 
    AMP page, minification is limited
    
    Served from: blogdocaminhoneiro.com @ 2021-08-26 09:28:00 by W3 Total Cache
    -->

    Is there a way I can remove this code snippet from all pages?

    Errors in Search Console

    A tag or text for use only in the body section is outside that section.
    A mandatory HTML tag for AMP is missing from the document.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rafael1338

    Thank you for reaching out and I am happy to answer your question.
    There is no option in W3 Total Cache to remove the HTML snippet. However, there are a couple of things that you can do.
    If you have Minify enabled in Performance>General settings, you can also enable HTML to minify in Performance>Minify, which will remove the comment.
    Alternatively, you can also add the following to your theme’s functions.php file:
    add_filter( 'w3tc_can_print_comment', function( $w3tc_setting ) { return false; }, 10, 1 );
    Thanks!

    Thread Starter rafael1338

    (@rafael1338)

    Thanks!

    Looks like it really worked. Thanks!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rafael1338

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review?here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AMP erros in Search Console’ is closed to new replies.