• Resolved WPO+

    (@ivanpr)


    Issue:
    The extension ‘amp-accordion extension .js script’ was found on this page, but is unused (no ‘amp-accordion’ tag seen). This may become an error in the future.

    Solution:

    // Remove AMP-accordion Library
    add_filter( ‘amp_post_template_data’, ‘gp_ampforwp_add_design3_required_scripts’, 101 );

    function gp_ampforwp_add_design3_required_scripts( $data ) {
    unset($data[‘amp_component_scripts’][‘amp-accordion’]);
    return $data;
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    Hey @ivanpr,

    Can you share the URL of where you are getting this warning?

    Regards
    Marqas

    Thread Starter WPO+

    (@ivanpr)

    @ampforwp any page that does not have the
    <amp-accordion><section>… will cause this validation error.

    p.s. I am currently using your Custom Theme plugin.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hey @ivanpr,

    I apologize for the delay in response.

    Yes, we are aware of this issue and we will resolve it soon.

    Regards
    Marqas

    plz where i can put this code
    // Remove AMP-accordion Library
    add_filter( ‘amp_post_template_data’, ‘gp_ampforwp_add_design3_required_scripts’, 101 );

    function gp_ampforwp_add_design3_required_scripts( $data ) {
    unset($data[‘amp_component_scripts’][‘amp-accordion’]);
    return $data;
    }

    Salam n Hola

    Thank you @ivan for the code snippet.
    It works like a charm..

    @ampforwp, seems like this bug is still not fixed yet at the moment. Or am I missing an update?

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘AMP-accordion usage’ is closed to new replies.