Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    I also have a problem with youtube video embeded into post, video not showing, and AMP test tools say that the amp-youtube script not included.

    Thread Starter popeating

    (@popeating)

    i solved mine in a trivial way,
    first i try to debug the class-amp-youtube-embed.php class
    but it all seems correct (it creates the right amp code but did not put inside the content for no apparent reason)
    so i decided to go for the hard way
    in class-amp-post-template.php
    i commented out the youtube filter (around line 235 -> 'AMP_YouTube_Embed_Handler' => array())
    and i set the ‘add_placeholder’ on iframe_sanitizer (line 253) to false;

    this way it insert the youtube video and the page is parsed correctly by google
    also i modified the class-amp-gallery-embed.php
    on line 136 from implode( 'PHP_EOL', $images ) to implode( '', $images )
    this solved me some issues about gallery with empty images;
    this plugin is a great start as a way to implement AMP in custom ways
    (i added ads, social share, analytics for views and events, customized template and more)

    Great! now try to investigate more in deep.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Youtube videos not showing’ is closed to new replies.