• Resolved blogdeinstalatii

    (@blogdeinstalatii)


    HI,
    I have some errors regarding AMP version of my site in Google Search Console.

    – Custom JavaScript is not allowed
    /amp/

    -The AMP URL you refer to is not a AMP
    /centrala-termica-ieftina/amp/

    Can you help me?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Google Search is giving me AMP errors as well.

    “New AMP error types now visible in Search Console for [sitename]”, and refers the code below as the error.

    <script>if (document.location.protocol != "https:") {document.location = document.URL.replace(/^http:/i, "https:");}</script><script type='text/javascript' src='https://cdn.ampproject.org/v0.js' async></script>

    • This reply was modified 6 years, 9 months ago by SEOAlien.
    Plugin Author Weston Ruter

    (@westonruter)

    @blogdeinstalatii You do not seem to be using this AMP plugin but rather another one.

    @seoalien This validation error regarding custom JavaScript may be fixed by adding the following code to your theme’s functions.php:

    add_action( 'pre_amp_render_post', function() {
        remove_all_actions( 'wp_print_scripts' );
    } );

    This will be fixed in the plugin via https://github.com/Automattic/amp-wp/issues/1225

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom JavaScript is not allowed’ is closed to new replies.