Title: AMP not working with WPCode Lite
Last modified: March 26, 2024

---

# AMP not working with WPCode Lite

 *  Resolved [idrisbadmus](https://wordpress.org/support/users/idrisbadmus/)
 * (@idrisbadmus)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/amp-not-working-with-wpcode-lite/)
 * Support UUID: ampwp-a584fd11-11bc-5886-b9e0-3f52f17bbe4d
   Thank you. I am using
   the WPCode Lite plugin to add custom code to my website header and footer. I 
   noticed that AMP throws this errors with WPCode Lite.
    - **[Invalid inline script](https://offspring.ng/wp-admin/edit.php?amp_validation_error=7464c536827a4be2aea6c6bd731d3da1&post_type=amp_validated_url)**
    - **[Invalid inline script](https://offspring.ng/wp-admin/edit.php?amp_validation_error=ef924a4891e01f70437b4417e30f9d8e&post_type=amp_validated_url)**
    - **[Invalid script: `admin-bar.js`](https://offspring.ng/wp-admin/edit.php?amp_validation_error=e673a750559b363de042286ec0e07906&post_type=amp_validated_url)**
 * 
   Is there a way I can add custom code to my website header and footer without
   this incompatibility issues.

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

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/amp-not-working-with-wpcode-lite/#post-17532907)
 * Hello [@idrisbadmus](https://wordpress.org/support/users/idrisbadmus/)
 * Thanks for reaching out to us! There’s a thing with AMP pages, they don’t allow
   custom JavaScript. That’s why the AMP plugin for WordPress gets rid of it to 
   make sure the AMP page is valid.
 * The issue seems to be with your WPCode Lite plugin, which adds custom JavaScript
   in header and footers, which AMP removes to create valid AMP pages.
 * If you’re adding scripts for things like analytics or tracking, there are actually
   AMP components you can use such [amp-analytics](https://amp.dev/documentation/components/amp-analytics)
   instead. These work great with AMP pages.
 * We hope this helps!
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/amp-not-working-with-wpcode-lite/#post-17550590)
 * [@idrisbadmus](https://wordpress.org/support/users/idrisbadmus/) As we didn’t
   receive a response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

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

The topic ‘AMP not working with WPCode Lite’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/amp-not-working-with-wpcode-lite/#post-17550590)
 * Status: resolved