How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support AMP iframe issue

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3324
    admin
    Keymaster

    Hi!

    I looked your code but I don’t understand how the mce_src is added to your markup. I believe that the value of “iframe_demo_game” has only the URL?
    Also the “iframe_demo_game” what type of field is?

    #3345
    casino1
    Participant

    Thanks for the reply.

    Me neither, it’s very confusing. And google mce_src gives 0 results.

    Yes, it’s only the url to the iframe.

    These are the ACF conditions for the iFrame field:

    array(
    ‘key’ => ‘field_5a82e9a68111e’,
    ‘label’ => ‘Iframe Demo Game’,
    ‘name’ => ‘iframe_demo_game’,
    ‘type’ => ‘textarea’,
    ‘instructions’ => ”,
    ‘required’ => 0,
    ‘conditional_logic’ => 0,
    ‘wrapper’ => array(
    ‘width’ => ”,
    ‘class’ => ”,
    ‘id’ => ”,
    ),
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘maxlength’ => ”,
    ‘rows’ => ”,
    ‘new_lines’ => ”,
    ),

    #3354
    admin
    Keymaster

    Hi!

    If you output the value of this field “iframe_demo_game” to an AMP template and this field has a HTML iframe this is going to be invalid for the AMP specs.
    AMP has it’s own element for iframes : https://www.ampproject.org/docs/reference/components/amp-iframe
    You can either add you element as an amp-iframe and not iframe or before the output use the html sanitizers of AMP plugin so the HTML iframe to be converted to AMP iframe.

    #3364
    casino1
    Participant

    Hmm, but the html-mark up is added to the amp-template:

    <amp-iframe width=”400″ height=”225″
    sandbox=”allow-scripts allow-same-origin”
    layout=”responsive” src=”<?php the_field(‘iframe_demo_game’); ?>”>
    <amp-img placeholder layout=”fill”
    src=”https://ampproject-b5f4c.firebaseapp.com/examples/images/kittens-biting.jpg”></amp-img>
    </amp-iframe>

    For the iframe_demo_game field, I only add the following: https://caocw.playngonetwork.com/casino/PlayMobile?pid=2&gid=bookofdeadmobile&lang=en_GB&practice=1

    That shouldn’t be tagged as an iframe – or I’m I missing something? 🙂

    #3366
    admin
    Keymaster

    Yes you are correct, if in the field “iframe_demo_game” there is only the URL of the iframe it is ok.
    Also if tyou are already using the element then it should be fine.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.