Skip to content

One more fix for AMP WordPress plugin

With the recent AMP update at Google you may notice increased number of AMP parsing errors in your search console. They look like


The mandatory tag 'html ⚡ for top-level html' is missing or incorrect.

Some plugins, e.g. Add Meta Tags, may alter language_attributes() using 'language_attributes' filter and adding XML-related attributes which are disallowed (see www.ampproject.org/docs/reference/spec#required-markup ) and that causes the error mentioned above.

I have made a fix solving this problem and made pull request for WordPress AMP plugin, you may see it here:
github.com/Automattic/amp-wp/pull/531

1 thought on “One more fix for AMP WordPress plugin

  1. Maxime

    The issue with language_attributes() has been fixed in WP AMP plugin version 0.4.2 in a different way, by replacing language_attributes() call with manually created lang and dir attributes.

Leave a Reply

Your email address will not be published.