• Resolved ahelling

    (@ahelling)


    Hello,

    Forgive me, I’m new to this, so I appreciate your help.

    I posted a new article and got an error for a number of plugins that I use on the site. However, none of these are currently used on the post in question.

    I get an error that says invalid_element:<script> and under details it says <head>. Can you please shed some light on this and why it is important? And what action I need to take to fix this?

    Below is a link to a Google Drive folder that has a photo of the error recap I get.

    https://drive.google.com/open?id=1UDRLYw0zxLNeE_R7NFze4Uzj0arz38WJ

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

Viewing 1 replies (of 1 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there

    AMP does not allow custom JavaScript on the page.

    However, some of your plugins do output custom JavaScript on AMP pages, which makes it invalid AMP.

    The page on your screenshot shows you a list of invalid elements and the plugins that have been detected to cause the issues.

    Now, the AMP plugin automatically removes those elements for you in order to make it valid AMP again. You can accept that behavior by changing the status of all these items to “Accepted”.

    Due to this restriction, there might be some layout glitches or missing functionality that might warrant some further inspection.

    For this, I recommend you to read the thorough documentation about how to build WordPress AMP sites: https://amp-wp.org/documentation/developing-wordpress-amp-sites/

Viewing 1 replies (of 1 total)

The topic ‘invalid_element:’ is closed to new replies.