• Resolved lenav7

    (@lenav7)


    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 to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @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

    (@lenav7)

    Hello, thank you for replying.

    Here is the link: 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

    (@milindmore22)

    hello @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.
    • Serve the functionality in an iframe via amp-iframe.
    Thread Starter lenav7

    (@lenav7)

    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

    It may be possible to use an amp-iframe depending on the functionality. You’ll find some guidelines here.

    If you’re running into trouble implementing amp-script or an 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.