• Resolved bselfors

    (@bselfors)


    Hello,

    I am running into an issue when trying to add videos for both youtube and iframe within my amp pages.

    I loaded both amp components, however, it seems I need to write some sort of conditional statement to display amp on mobile or the regular iframe on desktop?

    Do you have any examples of how to achieve this since when I add the amp video code it doesnt display on desktop and vise versa. Thank you so much for you help!

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

Viewing 1 replies (of 1 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    What is the issue? Is it:

    The tag ‘amp-iframe extension .js script’ appears more than once in the document. This will soon be an error.

    If you are using the components inside the post content then there is no need to add any scripts manually. Otherwise, the AMP plugin automatically includes the required scripts. How are you adding them to the page? For how to add the scripts, see: https://ww.wp.xz.cn/support/topic/the-tag-amp-ad-extension-js-script-appears-more-than-once-in-the-document/#post-10262578

    Otherwise, if the Transitional (or Native) mode works for you, then you don’t need to do any of this. Your theme may not yet be compatible with this mode, but whenever possible we recommend it over Reader mode.

Viewing 1 replies (of 1 total)

The topic ‘Conditional Videos/iFrames’ is closed to new replies.