How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Solve problem with amp validator


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #2217

    Hi guys! In my google console have appeared the warning messages of the review pages in “amp” format
    It turns out that in the code of the page in “amp” there are 2 identical script “amp-carousel-0.1.js”. This is why the validator amp gives an error.
    It is a small inconvenience that the developers of the Poka Theme v2 have not reviewed, and it can be solved by eliminating the line of code in the “amp-header.php” file of its theme.

    <script async custom-element = “amp-carousel” src = “”&gt; </ script>

    After removing this line the code solves the problem!

    See the screenshots:

    The new file code “amp-header.php”
    <!doctype html> <html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <?php do_action( 'amp_post_template_head', $this ); ?> <link rel="stylesheet" href=""> <style amp-custom> <?php $this->load_parts( array( 'style')); ?> <?php do_action( 'amp_post_template_css', $this); ?> </style> <script async custom-element="amp-sidebar" src=""></script> </head> <body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>"> <header class="amp-header"> <div class="container"> <a href="<?php echo esc_url( home_url() ); ?>" class="amp-logo"> <?php if( get_field('site_logo','options') ){ $site_icon_url = get_field('site_logo','options'); } else { $site_icon_url = get_template_directory_uri().'/images/logo.png'; } ?> <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" layout="fill" class="amp-logo-img"></amp-img> </a> <button class="amp-toggle-menu" on='tap:sidemenu.toggle'><i class="fa fa-bars" aria-hidden="true"></i></button> </div> <!-- /.container --> </header> <amp-sidebar id="sidemenu" layout="nodisplay" side="left"> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'menu hidden-md-down', 'container' => false ) ); ?> </amp-sidebar>


    Hi duende!

    Thanks again for the heads up!
    Apparently with the latest version of the AMP plugin this bug occurred, it is going to be fixed in the next version of poka!


    OK thanks! If the latest version of AMP plugin has already been added in its code the amp-carousel script, so when validating “amp page”, it gives an error and warning.

    Casinos Fortune

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