Support » Plugin: AMP for WordPress » AMP Breaks on Child Categories

  • Hi there,

    First off for the authors of this plugin, thank you so much for a great plugin. I truly appreciate not having to pull hair in an attempt to get a secondary theme running for amp on my own.

    I’m not sure if this is a bug that’s been reported before. I looked, but may have tried the wrong keywords…

    I’ve spent two days trying to figure out why AMP would redirect to the original website theme (genesis) for two of my posts.

    I was notified by Google Search Console that I had “critical” errors happening for two posts, that was generating code such as:

    “The attribute ‘style’ may not appear in tag ‘div’.
    The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.
    The parent tag of tag ‘head > style[amp-boilerplate] – old variant’ is ‘a’, but it can only be ‘head’.
    The attribute ‘onclick’ may not appear in tag ‘a’.
    The attribute ‘property’ may not appear in tag ‘a’.”

    When I clicked on the amp links for these two posts, they both redirected back to the original theme url (sans /amp/), disregarding the amp request.

    After going through the code for each article thoroughly to see what was similar, I finally took a look at the url links specifically and realised that both were linked to child categories, and my permalink structure is /%category%/%postname%/.

    When I switched the url category to the parent for both posts, amp finally worked again for these two articles.

    I wasn’t entirely happy with having to change the category in the URL for each post, but will live with it, unless there is some toggle or action that I missed doing to fix this error?

    Thanks for your time.

  • The topic ‘AMP Breaks on Child Categories’ is closed to new replies.