Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cabplan

    (@cabplan)

    The script I added to my functions.php to let the AMP version of the post is this:

    add_action( 'amp_post_template_footer', 'amp_add_iframe' );  // Adding iframe script to head tag of Amp page 
    function amp_add_iframe( $amp_template ) { ?>
    <script>
    	window.onload = function () {
    		var t = document.getElementsByName('amp_iframe0')[0].src;
    		t = t.substr(0, t.lastIndexOf("/"));
    		var frame_src = document.getElementsByName('amp_iframe0')[0].src = t;
    	}
    	
    </script>

    But again this does not help the CDN that cdn.ampproject.org is serving, because Apps like LinkedIn serve that CDN version, not my URL.

    Thread Starter cabplan

    (@cabplan)

    So after digging and digging, and no one answering my question above, I believe it actually turns out that is had to do with the Vimeo link used, it was a private Vimeo link, instead of the public link, even though it was set to public. Also there was discrepancies where I had to re-save Vimeo settings in Vimeo to actually get videos to appear in the post when the AMP page was displaying fine, very strange.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Vimeo video iframe source is not working’ is closed to new replies.