Title: invalid_element:
Last modified: October 2, 2019

---

# invalid_element:

 *  Resolved [ahelling](https://wordpress.org/support/users/ahelling/)
 * (@ahelling)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/invalid_element-2/)
 * 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](https://drive.google.com/open?id=1UDRLYw0zxLNeE_R7NFze4Uzj0arz38WJ)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid_element-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Pascal Birchler](https://wordpress.org/support/users/swissspidy/)
 * (@swissspidy)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/invalid_element-2/#post-11988701)
 * 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/](https://amp-wp.org/documentation/developing-wordpress-amp-sites/)

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Pascal Birchler](https://wordpress.org/support/users/swissspidy/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/invalid_element-2/#post-11988701)
 * Status: resolved