Youtube video using Gutenberg not showing in posts
-
When we insert a Youtube embed with Gutenberg we can see the video and post correctly in the editor but once you visiualize the page the video is not showing.
<!– wp:core-embed/youtube {“url”:”https://www.youtube.com/watch?v=iUZ3Yxok6N8″,”type”:”video”,”providerNameSlug”:”youtube”,”className”:”wp-embed-aspect-16-9 wp-has-aspect-ratio”} –>
<figure class=”wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper”>
</div></figure>
<!– /wp:core-embed/youtube –><figure class=”wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio wp-embed-aspect-4-3″><div class=”wp-block-embed__wrapper”>
<span class=”embed-youtube” style=”text-align:center; display: block;”><iframe class=”youtube-player” type=”text/html” width=”1200″ height=”675″ src=”https://www.youtube.com/embed/ZE9KpobX9J8?version=3&rel=1&fs=1&autohide=2&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent” allowfullscreen=”true” style=”border:0;”></iframe></span>
</div></figure>If we use the html editor the video is shown
<!– wp:html –>
<figure><iframe width=”1280″ height=”720″ src=”https://www.youtube.com/embed/BbL3RucD0a4″ allowfullscreen=””></iframe></figure>
<!– /wp:html –>With another theme this does not occur. We have seen that the problem may be due to the theme using $post->post_content and not “the_content()” option. Or how the embed function works. add_theme_support( ‘responsive-embeds’ ).
We did not have this problem in the past with the Oceanwp theme
- The topic ‘Youtube video using Gutenberg not showing in posts’ is closed to new replies.