Title: Javascript
Last modified: March 20, 2021

---

# Javascript

 *  Resolved [lenav7](https://wordpress.org/support/users/lenav7/)
 * (@lenav7)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/)
 * Greetings
 * So in the footer area, I inserted a short code for shop my post widget that contains
   the products for my post. But unfortunately, it shows error on AMP pages where
   it goes ” Turn on Javascript to view content”. How can I fix this? Thank you 
   😊
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-46%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14216927)
 * Hello [@lenav7](https://wordpress.org/support/users/lenav7/)
 * The AMP page does not allow custom javascript. in order to create valid AMP pages,
   the AMP plugin removes any custom javascript added by your theme or plugin.
 * Can you please share the page URL where I can check the issue, also please share
   if you are using any plugin which maybe adding a widget?
 *  Thread Starter [lenav7](https://wordpress.org/support/users/lenav7/)
 * (@lenav7)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14217589)
 * Hello, thank you for replying.
 * Here is the link: [https://www.thebrowndress.com/how-to-repair-and-maintain-clothes/](https://www.thebrowndress.com/how-to-repair-and-maintain-clothes/)
 * If you scroll to the bottom of the page, it will show the error. Currently, AMP
   has removed the error for me and validated it. But is there any way that I could
   use it to display the javascript on amp pages?
 * It is a plugin from Rewardstyle which I downloaded from a zipped file.
 * Thank you
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14218004)
 * hello [@lenav7](https://wordpress.org/support/users/lenav7/)
 * I will recommend contacting the plugin author and provide these options, to use
   custom JS:
    - Use an AMP component that implements the desired functionality.
    -  Develop an alternative that works with JS turned off. While the AMP plugin
      removes custom JS it will at the same time unwrap noscript tags, so if you
      have fallback behavior for when JS is turned off in the browser, then this
      will become the baseline AMP experience.
    - Refactor your JS to be containable in [amp-script](https://amp.dev/documentation/components/amp-script/).
    - Serve the functionality in an iframe via [amp-iframe](https://amp.dev/documentation/components/amp-iframe/).
 *  Thread Starter [lenav7](https://wordpress.org/support/users/lenav7/)
 * (@lenav7)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14231429)
 * Hello, thank you for your suggestions. Unfortunately, I cannot contact the provider.
   Any chances that I may use the amp iframe to make this work? Thank you
 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14234910)
 * It may be possible to use an amp-iframe depending on the functionality. You’ll
   find some guidelines [here](https://amp.dev/documentation/components/amp-iframe/).
 * If you’re running into trouble implementing [amp-script](https://amp.dev/documentation/components/amp-script/)
   or an [iframe](https://amp.dev/documentation/components/amp-iframe/) solution
   you can reach out to the usual support channels, including Slack Overflow or 
   GitHub.

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

The topic ‘Javascript’ 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/)

 * 5 replies
 * 3 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-46/#post-14234910)
 * Status: resolved