• I’m trying to embed a YouTube video on a post using the Custom HTML block since I need to also add two parameters to the URL. It shows up fine in preview, but when I visit the actual post, nothing shows up.

    I would just upload the video to my media library but there is no way to adjust the size of the video, unlike a YouTube embed.

    Here’s the code I’m using:

    
    <iframe width="560" height="315" src="https://www.youtube.com/embed/kmhwj9QBhNE?rel=0&modestbranding=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    
    • This topic was modified 4 years, 11 months ago by Jan Dembowski.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The code isn’t being output to the page you linked at all. Can you show a screenshot from your WP admin? In the code you posted, you are missing a closing quote after the YouTube url.

    Thread Starter jublai

    (@jublai)

    Yeah, my issue is that it’s not being outputted to the page. Also, whoops, the closing quote is there in the original, for some reason when I pasted it here, it removed it. Here’s the proper code:

    <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/kmhwj9QBhNE?amp;rel=0&modestbranding=1&#8243; frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

    Here’s a link to some screenshots:

    YouTube Embed

    There is also an issue where whenever I leave the post editor, it wipes all the HTML leaving the empty block (first screenshot). Not sure if that’s the reason it’s not showing up in the post.

    • This reply was modified 4 years, 11 months ago by jublai.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Embedded YouTube Video Not Showing on Post’ is closed to new replies.