Tutorials WordPress

How to Embed a YouTube Video in WordPress


Written by

Dave Warfel

Reading Time

10 minutes

If you buy something from one of our links, we may earn a commission.

YouTube has over a billion users—almost one-third of all people on the Internet—and every day people watch hundreds of millions of hours on YouTube and generate billions of views (source). When you combine those numbers with WordPress powering 27% of the web, you’ve certainly got a match made in heaven.

It’s almost inevitable that you’ll want to embed a YouTube video on your WordPress site. This could be a marketing video for a business site, an educational or instructional video, a personal video embedded on your blog, etc. Let’s walk through the various options, and I’ll help you choose which method is best for your situation.

[adrotate banner=”150″]

There are 4 main ways to embed a YouTube video in WordPress:

  1. Using oEmbed (easiest)
  2. Using the embed shortcode (a few more options)
  3. Using an <iframe> (a lot of customization)
  4. In your WordPress sidebar
  5. Troubleshooting

We have also answered a few YouTube embed FAQs, which include info on related videos (rel=0) & video titles always being displayed (as of 25 Sep 2018).

If you’re in a hurry, watch our YouTube video embed tutorial:

01 Easiest Way to Embed a YouTube Video in WordPress

The easiest way to embed YouTube videos in WordPress is to simply paste the URL onto your page/post edit screen. Make sure you’re using the Visual editor, and not in Text mode.

Embed YouTube Video on Visual Tab
Make sure you’re in “Visual” mode, not “Text” mode

Then just paste the YouTube URL on it’s own line.

You can use the shortened, share URL: https://youtu.be/IZuTNOxTA-Q

YouTube share URL
How to get the YouTube share URL

Or use the full URL in your browser’s location bar: https://www.youtube.com/watch?v=IZuTNOxTA-Q

YouTube video URL in browser
You can also use the full YouTube watch URL

Either one will work.

Here’s a quick animation:

Embed YouTube Video in WordPress animation

This works because of a technology called oEmbed. There are other types of content you can insert into WordPress just by pasting the URL in your post screen. Learn more about WordPress oEmbeds »

02 Embed YouTube Video in WordPress using a shortcode

Huh? What is a WordPress shortcode?!

If you’d like to set a maximum width or height on your video, you can use the embed shortcode. The shortcode works in both Visual and Text mode, and has two optional parameters:

  • width
  • height

Just add the following code into your post edit screen:

WordPress embed code for YouTube video

Add your YouTube URL where it says “YOUTUBE URL GOES HERE,” and change the width & height parameters to fit your needs.

  • Remember: These are maximum dimensions, not exact. It will prevent the video from being any larger than what you define, but it could possibly display smaller.

You can also use the Media Library to add a YouTube video. This will use the same embed shortcode as above, it’s just a different way to do it.

  • Place your cursor on a new line, where you want to embed the video
  • Click Add Media
  • On the left, click Insert from URL
  • Paste in the full watch URL or the share URL from YouTube
  • Click the Insert into Post button at the bottom of the screen

WordPress YouTube embed, media modal instructions

03 Embed YouTube Video in WordPress using an <iframe>

If you want much more flexibility over how your YouTube videos are displayed on your WordPress site, this method is for you. It’s a little more technical than the first 2 methods, but still not too difficult.

Using the <iframe> embed method will provide you with the following options for customization:

  • Fullscreen: Whether or not to allow visitors to enlarge the video to cover their entire screen
  • Related Videos: Whether or not to show related videos after this video is finished playing (they are chosen by YouTube)
  • Player Controls: Whether or not to show the play/pause, volume, captions, etc. buttons
  • Title/Sharing: Whether or not to show the video title & sharing options
  • Autoplay: Whether or not to automatically start playing the video when the page loads
  • Captions: Whether or not to show video captions by default
  • Start Time: Choose a specific time within the video for it to start
  • Privacy: Enable advanced privacy settings
  • …and more (see below)

You used to be able to adjust the video size, but YouTube has removed this setting. They now use an updated embed code that wraps the <iframe> in a <div> and uses CSS to make the video responsive at all screen sizes.

How to use the <iframe> method

  • On YouTube.com, navigate to the video you want to embed
  • Click on Share
  • Then click on Embed

YouTube share/embed buttons

  • You can adjust the settings by checking the boxes below the embed preview

YouTube advanced embedding options

  • Copy the code
  • Go back to your WordPress editing screen, and click on the Text tab
  • Paste the code on it’s own line, where you want the video to appear

How to customize YouTube video playback via the URL

Now I’ll show you how to adjust all the settings that I mentioned above.

Here is a list of URL parameters you can add to the end of the <iframe> src attribute:

  • rel=0 – disables related videos at the end

NOTE: As of September 25, 2018, you can no longer disable related videos. However, using rel=0 will show related videos only from the same channel (and not from other channels).

  • controls=0 – Hides the player controls (play/pause, volume, captions, settings, fullscreen, etc.) at the bottom
  • showinfo=0 – Hides the video title & sharing options at the top

showinfo is deprecated as of September 25, 2018 and will just be ignored.

  • autoplay=1 – Starts playing the video automatically, when the page loads
  • loop=1 – Repeats the video, as soon as it reaches the end
  • mute=1 – Disables the sound, by default.
  • disablekb=1 – Disables the keyboard controls
  • cc_load_policy=1 – Automatically turns on captions
  • start=60 – Starts the video at a specific time (Use a positive integer denoting seconds. Ex: start=60 will start the video at the 1:00 mark.)
  • end=180 – Stops the video at a specific time (Use a positive integer denoting seconds. Ex: end=180 will stop the video at the 3:00 mark.)
  • allowfullscreen – This is not a URL parameter, but you remove this attribute from the <iframe> to disable fullscreen mode
  • iv_load_policy=3 – Hides all video annotations
  • modestbranding=1 – Removes the YouTube logo from the control bar
  • Privacy-enhanced mode – This is done by checking the “Enable privacy-enhanced mode” checkbox. The URL changes from www.youtube.com to www.youtube-nocookie.com.

View a full list of parameters & explanations »

Examples w/ Parameters Enabled

How to disable fullscreen mode on a YouTube embed:

  • Simply remove “allowfullscreen” from the <iframe> code
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q" width="640" height="360" frameborder="0"></iframe>

How to disable related videos (as of 25 Sep 2018, this no longer works).

  • Add rel=0 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?rel=0" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to hide YouTube player controls on a video embed:

  • Add controls=0 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?controls=0" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to remove the YouTube logo on your video embed:

  • Add modestbranding=1 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?modestbranding=1" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to hide a YouTube video title & sharing options (as of 25 Sep 2018, this no longer works):

  • Add showinfo=0 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?showinfo=0" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to autoplay a YouTube video on page load:

  • Add autoplay=1 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?autoplay=1" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to automatically turn YouTube captions on:

  • Add cc_load_policy=1 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?cc_load_policy=1" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to set a YouTube video embed to mute by default:

  • Add mute=1 to the end of the src URL
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?mute=1" width="640" height="360" frameborder="0" allowfullscreen></iframe>

How to start a YouTube video at a specific time (ex: 1:00):

  • Convert the time into total seconds
  • Add start=60 to the end of the src URL (60 seconds = 1 minute)
<iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?start=60" width="640" height="360" frameborder="0" allowfullscreen></iframe>

04 How to Embed a YouTube Video in your WordPress Sidebar

As of WordPress 4.8, there’s a new video widget that makes embedding a YouTube video in your sidebar a breeze. Let’s take a look at how to set it up.

Embed YouTube video in WordPress sidebar, animation

  1. Navigate to Appearance > Customize (you could also go to Widgets, but Customize shows you a real-time preview)
  2. Click on Widgets
  3. Then find the sidebar area that you want to add the video to (you might have multiple sidebar areas listed)
  4. Click Add Widget
  5. Search for the Video widget, and click on it
  6. Click the Add Video button
  7. On the left, click Insert from URL
  8. Then paste the YouTube video URL into the box
  9. You’ll see a preview of your video
  10. Click the Add to Widget button
  11. At the top of the Customizer, click Save & Publish

YouTube Video Embed Not Working?

The most common issue we’ve seen for a WordPress YouTube video embed not working is that the video creator has disabled embedding. When the creator chooses this option, you have to go to youtube.com to watch the video.

You will first notice that embedding has been disabled because the “EMBED” option under the “Share” menu will be greyed out:

YouTube embed disabled
Notice the “EMBED” is greyed out

If you’ve already tried to embed the video within WordPress, pull up the page that it’s on. You’ll likely see this message:

“Watch this video on YouTube.
Playback on other devices has been disabled by the video owner.”

Playback on other websites has been disabled by the video owner.

The Solution

There isn’t much you can do. Video owners reserve the right to allow or forbid their videos to be embedded on other websites.

  • Reach out to the video owner and ask if they’ll allow you to embed it
  • Ask them if they’ll provide a form of the video you can upload on your own YouTube channel
  • Embed or insert some other multimedia content that gets your point across
  • Take screenshots of the video and include those instead (always link back to the video, and it’d be nice if you let the original creator know)

WordPress YouTube Video FAQ

Can I include comments with my YouTube video embed?
No. YouTube only allows you to embed the video itself. You cannot embed a video’s comments.
Can I include the video description with my YouTube embed?
No, you cannot include the description of a YouTube video embed. Only the video itself can be embedded.
Can I remove the YouTube logo from my video embed?
Yes. In your embed code, add the modestbranding=1 parameter to the end of your src URL.
Can I disable related videos from showing at the end of my video?
This used to be an option, but as of September 25, 2018, it is no longer possible. Using the rel=0 parameter will now show related videos from your channel only, but YouTube has decided that it will always show related videos at the end of all videos now.
Why isn’t showinfo=0 working?
This option was deprecated by YouTube on September 25, 2018 and will now just be ignored. YouTube said, “Following the change, the channel avatar and video title will always display before playback begins, when playback is paused, and when playback ends. The avatar being displayed is new behavior that will be consistent across all embedded players.”

If you have any trouble embedding a YouTube video on your WordPress site, please let me know in the comments and I’ll try to help out.

Did you know you can embed YouTube playlists in much the same way as videos?

Learn how to embed a YouTube playlist in WordPress »

Dave Warfel

LinkedIn  •  X (Twitter)Dave has been working with WordPress since 2011. He's built 100s of client sites and almost a dozen of his own. He's tested almost every plugin you can think of, hosted with at least 10 different companies, and gone down every SEO rabbit hole you can imagine. When's he's not tinkering with new software, you'll find him in the mountains of Colorado, trail running, summiting peaks, and rippin' downhills on his mountain bike. 🏔️🏃🚴🤸

106 responses to “How to Embed a YouTube Video in WordPress”

  1. Mary Avatar

    In WordPress.org posts, starting a Youtube from a particular point, e.g., at 0:30 seconds, works. But when embedding a Youtube in the sidebar, it only seems to allow starting at the beginning, i.e., at 0:00. Is there a remedy to that? Thanks.

    1. Dave Warfel Avatar

      Great question, Mary. The new WordPress Video Widget uses a custom video player (instead of the standard YouTube player), and it does not recognize the “start at” variable.

      So using the Video Widget will not work.

      However, if you use the iframe method I described above, you can insert the iframe code into a “Text” widget in your sidebar, and that will honor whatever “Start At:” variable you choose.

      So you’d add a “Text” widget to your sidebar, switch from Visual mode to Text mode, and then your iframe code would look like this:

      <iframe width="560" height="315" src="https://www.youtube.com/embed/yAGyYGPsSZw?start=30" frameborder="0" allowfullscreen></iframe>

      Let me know if you have further questions.

  2. Mary Avatar

    Thank you for your helpfulness. Using the iframe method, that did work, to a point. It starts at the preferred delayed start time now (e.g., at 30 seconds). Unfortunately, after the video has played, whether a person clicks the start arrow in the middle of the screen or the replay arrow at bottom left, when it replays, it goes back to playing the video starting at 0:00. In case it’s helpful to know, I also have it set not to allow suggested videos at the end (so my custom code reads start=30&rel=0). When I grabbed the embed code at Youtube, I first made these choices
    (unchecked) Show suggested videos when the video finishes
    (checked) Show player controls
    (checked) Show video title and player actions
    (checked) Enable privacy-enhanced mode [?]

    Thanks again for any help you can offer.

    1. Dave Warfel Avatar

      Mary – Unfortunately, I don’t think there’s any way to get it to start at 0:30 when it is re-played. The parameters in the iframe method only work for the initial play. I wish I had a better answer, but that’s just how YouTube embedding works. Sorry :-/

  3. Connor Avatar

    The part about making the video play automatically and play at a certain time was very helpful. As im not a very technical person when it comes to coding, this was easy to understand. Basic HTML is as much as i can do haha.

    Interesting article!

    1. Dave Warfel Avatar

      That’s exactly why I wrote this article, Connor. For folks like you. Really glad it helped you out :-)

  4. Alicia Avatar

    Thank you for sharing your expertise. The problem I’m having is WordPress is apparently stripping the code I am adding (iframe I suppose) and converting it into their format. So even though I enter this:
    [ youtube https://www.youtube.com/watch?v=myvideo?autoplay=1&rel=0&controls=0&showinfo=0&w=560&h=315 ]
    When I save, it converts to this:
    [ youtube https://www.youtube.com/watch?v=myvideo?autoplay=1&rel=0&controls=0&showinfo=0&w=560&h=315 ]
    My goal is to get the video to autoplay without allowing the viewer to scrub (rewind/fast forward).

    1. Dave Warfel Avatar

      Hi Alicia — So you’re actually using what’s called the “embed code,” not the <iframe> code. First, make sure you switch from the Visual mode to the Text mode of the editor. Look in the top-right corner of the editor and click on the Text tab.

      Then you’ll paste the following code into the editor (replace with your video ID):

      <iframe width="560" height="315" src="https://www.youtube.com/embed/GSu1xOOJzKk?rel=0&controls=0&autoplay=1&showinfo=0" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>

      By placing the actual HTML code of the <iframe> embed, WordPress will not modify the code, and it should correctly autoplay and hide the player controls.

      Let me know if you’re still having issues after giving this a shot.

  5. Ryan Zell Avatar
    Ryan Zell

    Hi Dave,

    I have embedded a YouTube video into my WordPress blog. On the youtube video site are comments which did not cross over to the embedded WordPress blog. Is there anyway to make this happen?

    1. Dave Warfel Avatar

      Hi Ryan — Good question. Unfortunately, there is no way to include YouTube comments when you embed a video on your site. YouTube only lets you embed the actual video, not the comments.

  6. Nicole G. Avatar
    Nicole G.

    Great guide! My issue is that videos I uploaded to YouTube from Screenflow (Mac program, .mp4) work using the easy oEmbed, but…

    On PC I am using Camtasia to export the files (.mp4) ready for YouTube. If I try to use those as oEmbed only the link shows up in the post, not the embedded video. All settings checked many many times.

    I tried re-exporting from Camtasia as .wmv and this worked, they now show up using oEmbed. The issue is where we store the pre-YouTube files it will have a mix of .mp4 and .wmv the latter being incompatible with Mac playback.

    My solution seems to be try the other methods like iFrame embed for the Camtasia .mp4 uploads. This still leaves me with inconsistency in some posts using oEmbed and others iFrame, not sure if this creates issues on some videos functioning differently depending on platform. Not sure if it would even work.

    Another solution is to use the .wmv but if a Mac user needed to play the video outside of YouTube for some reason again this is an inconsistency.

    I’m puzzled as to why a Mac and PC .mp4 function differently in oEmbed once they have been uploaded to YouTube. Any suggestions for me? Thank you so much for your time!

    1. Dave Warfel Avatar

      Hi Nicole — Thanks for taking the time to explain your problem in detail.

      I’m not sure why .mp4 videos uploaded to YouTube from Mac would function any differently than those uploaded to YouTube from a PC. The program you use to record the videos should not matter.

      I could see how there might be an issue uploading the videos to YouTube if some of your settings in Camtasia don’t meet YouTube’s upload requirements, but once the video is on YouTube, your WordPress site should treat them all the same. There is no way for your WordPress site to know what program (or Mac vs. PC) was used. WordPress should just see everything as a YouTube video.

      As far as using a mix of oEmbed code vs. iframe code, it really isn’t a big deal to use both. The oEmbed functionality exists to make it easier for a non-technical user to embed a YouTube video. However, the code that is sent to the browser (which then becomes the experience of the user) is going to be an iframe code, regardless of which method you use in your WordPress editor.

      So, while I’ve never heard of this issue before, and you technically shouldn’t NEED to use different codes based on recording with PC vs. Mac… there is no harm in doing so.

      If you can send any screenshots that might help me troubleshoot, I’m happy to take a look. Your YouTube “My Videos” page, details of the uploaded videos (pc vs mac), the codes you’re using in your WordPress editor, etc.

  7. Greg Hill Avatar
    Greg Hill

    hi there, jumping on this thread. Great article, wondering if you could help with the code needed to add a poster image at the start instead of a random frame from the video.? My video isn’t actually hosted on you tube but in my google drive. It still uses iframe in the embed code it gives however. Thanks

    1. Dave Warfel Avatar

      Hi Greg — Good question.

      The <iframe> tag does not allow any parameters to use a poster image. So as long as you’re using an <iframe> to embed the video, there is no built-in way.

      However, there are a few other options:

      If you use the <video> tag instead, there is a specific “poster” attribute you can use. See this page for an example.

      If you want to stick with using the <iframe>, I found two options:

      This code is more technical & requires some JavaScript, but if you have some coding chops, it could work for you.

      This option uses CSS to apply a background image to the <iframe>. Once the <iframe> loads, though, I think whatever video poster image is being used will be displayed. So this might not be what you’re looking for.

      Any reason you’re not uploading the video to YouTube? YouTube allows you to set your own poster image for each video. If YouTube is an option for you, this would be my recommendation.

  8. TheShirtGuy72 Avatar

    I found this post in trying to hunt answers into: What are the best practices for embedding YT Videos into WordPress. Safest for security, fastest for page speed. Any insight would be helpful.

    1. Dave Warfel Avatar

      I would recommend using the default method that YouTube suggests for embedding videos, which is to use an <iframe>. I’ve outlined how to do that above.

      There is one additional change you could make to the default code if you want to protect your site visitor’s information, and prevent YouTube from collecting data on them. It’s called “Privacy-Enhanced Mode.” There is a checkbox to enable this when you go to grab a video’s embed code. Essentially, it loads the video from a domain that does not use cookies.


      <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/ewKgG0_wmp4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

      Notice the youtube-nocookie.com domain.

      If you’re looking for ways to speed up a page that has several YouTube video embeds on it, you should consider lazy loading the videos. If you’re using WordPress, WP Rocket has this feature built-in, and we strongly recommend them.

  9. Larry Avatar

    Hi, great article. We’ve been trying to embed a youtube video on our site without the white youtube logo in the lower right hand corner from showing, the other stuff works like removing controls and titles and all that, just can’t find a way to remove the youtube logo. We’ve tried it with the iframe method along with the others, just can’t figure that logo part out. Thanks

    1. Dave Warfel Avatar

      Hi Larry. You will need to use the <iframe> method to remove the YouTube logo. It’s the modestbranding=1 parameter that will achieve that for you.

      Here’s a sample iframe embed code with the YouTube logo removed.

      <iframe width="560" height="315" src="https://www.youtube.com/embed/GSu1xOOJzKk?modestbranding=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  10. Traci Avatar

    Hi. So here’s my issue: On one WordPress site I have no issues embedding a video from YouTube using the iframe method. However, on another WordPress site whenever I use iframe the video vanishes from the post as soon as I save or publish the post. What could be causing this?

    1. Dave Warfel Avatar

      Hi Traci — My best guess is that you have a plugin installed on one site that is causing a conflict. Can you take a screenshot of your plugins on the site you’re having a problem with, and post it here?

  11. Christian Vivas Avatar
    Christian Vivas

    If i use both the modestbranding=1 and showinfo=0, the youtube brand still appears in the embed. Anyway around this?

    1. Dave Warfel Avatar

      Great question, Christian. It’s possible you discovered a bug. I hadn’t noticed this, but I just tested it out, and the same is happening for me.

      I tried a few different things to see how they might affect the embed, and when I added the color parameter, the YouTube logo was NOT present on the still image that shows before you click the play button, but it did appear down inside the player controls in the bottom-right corner. This will, however, change the progress bar from red to white, which you may not want.

      Ex: ?modestbranding=1&showinfo=0&color=white

      I couldn’t tell you why it works this way. Seems quite strange. I recommend either playing around with some different combinations to see if you find one that works (and that you like), and/or try to submit a comment to Google/YouTube and let them know about this behavior.

      Thanks for joining the discussion, and I appreciate your attention to detail.

  12. Ben Zallaha Avatar
    Ben Zallaha

    Great information, thank you! The challenge I’m experiencing is the embedded video appears normal on the web, but is boxed on the mobile view-meaning there is black spaces outside of the 560×315 dimensions. I tried adjusting, but only see differences on the web view.

    1. Dave Warfel Avatar

      You’re welcome, Ben. Sorry to hear you’re having trouble.

      Paste your code here (or on codepen, etc.) and I’m happy to take a look and see if there’s a way to remove those pesky black bars on mobile.

      I think the dimensions of your originally uploaded video factor into the equation. But I’ll take a look and see if we can make it fully responsive.

    2. Ben Zallaha Avatar
      Ben Zallaha

      Appreciate you taking the time. I’m using the iframe embed code from YouTube. Regardless of what dimensions I select, the static screen still comes out distorted when viewing on mobile. You can see at the site http://www.hrmoriginaldesign.com

      [youtube https://www.youtube.com/watch?v=kmTgGBmnMeY?rel=0&showinfo=0&w=560&h=315%5D

      Again, thank you for your time!

    3. Dave Warfel Avatar

      Hi Ben,

      Sorry for the delayed response. I’ve got two options for you. The first one includes a little more work, but is arguably the better of the two.

      For each video, go to embedresponsively.com. Paste in your YouTube URL, and click “Embed.” Then copy that code, head back into WordPress, switch from Visual to Text mode, and paste in the code.

      This is adding a container div to your videos, and using some simple CSS to make the iframe inside of it (aka: your video) completely responsive.

      The second option would be to try the Fluid Video Embeds plugin. With this plugin installed, you would just need to paste your YouTube watch URL onto it’s own line in the editor (visual mode is fine), and the plugin does the rest.

      I don’t use this plugin, but based on some quick research, it appears to be the best for the job. I use the CSS method outlined above for all of my videos, and have never had a problem.

      Let me know how it goes, or if you run into any more issues.

    4. Ben Zallaha Avatar
      Ben Zallaha


      Again, thank you. Played with both suggestions. The EmbedResponsively would be perfect, however the YouTube logo appears on the mobile version of the video and none of the codes (modestbranding=1, etc) get rid of it.

      Any suggestions?

    5. Dave Warfel Avatar

      That’s interesting. I just tested out a video of mine, and without even adding modestbranding=1 to the end of the URL, there was no YouTube logo.

      I used the code exactly as embedresponsively.com provides, and this is what I got:

      Before pressing play:

      During play:

      Can you send me one of the URLs to a video you’re embedding so I can try it on my end? As of now, I can’t figure out why we’d be getting different results. But let me try your exact video and see what happens.

      Also, what type of mobile device are you using? Maybe that has something to do with it. (just thinking out loud of all the possible scenarios)

    6. Ben Zallaha Avatar
      Ben Zallaha

      Forgive me, I responded preemptively. In attempting to have a clean, no text on the video on my phone (Google Pixel 2 XL), I had ‘modestbranding=1’ and ‘showinfo=0’ at the same time after using embedresponsively. It appears that it is not possible to have both the description ‘showinfo=0’ and YouTube logos removed from videos (at least through my WordPress) on both the computer and mobile displays.

    7. Dave Warfel Avatar

      No worries. It sounds like you encountered the same thing that Christian did above (see comment).

      It seems like strange behavior, and it’s not documented anywhere that I could find. But for some reason, those two options do not work when used together.

      Wish I had a better option :-/

    8. Ben Zallaha Avatar
      Ben Zallaha

      Thank you for your time and help! Truly appreciate you!

  13. Jasalyn Thorne Avatar
    Jasalyn Thorne

    Using visual composer for my posts and adding YT video using several methods but viewers are complaining that it only shows a blank space in the blog post where the video ought to be. I can see it on my older iphone and computer no problem but people with newer phones are not able to view the video. Any suggestions on how to bes embed the YT video with responsive qualities for player size?

    1. Dave Warfel Avatar

      Hey Jasalyn — Could you send me a link to one of the pages you’re having a problem with? I’ll take a look at how you’re embedding the videos and see if there’s a better way.

      Which method(s) are you using to embed the video? Are you using a video element? If so, have you tried using a raw HTML element instead, and pasting the <iframe> embed code directly from YouTube?

  14. Hannah Avatar

    I used the LayerSlider WP plugin to add a video from my youtube page. The video works great on Safari and Internet Explorer but not Google Chrome, which is what a lot of our customers use. Help!!

    1. Dave Warfel Avatar

      Hi Hannah —

      I don’t use LayerSlider, and in fact, I don’t recommend it. It has a bad history of security issues, not to mention it adds a lot of weight to your site, which can slow things down.

      So while I can’t help you pinpoint exactly what is going on, I still want to help.

      1. Can you send me a link to the page you’re having the issue with? And briefly explain what is happening in Chrome?

      2. Are you using a specific component in LayerSlider for video? Have you tried using an HTML component and adding the embeddable <iframe> code instead?

    2. Hannah Avatar

      Wow! I love the quick response!

      The LayerSlider was what the IT company my office uses tried for this video….they were having trouble uploading it too so the LayerSlider was the solution they came up with. I am fairly new to using WordPress this intensely so I appreciate whatever help I can get.

      Using the HTML was my initial instinct for this situation but again the IT company we have been using did not think it would work. Here’s the link to the page:


      So, we did not want the video appearing as just a YouTube box you know? We wanted it to look like it was actually part of the site and look more seamless, if that makes sense. If you go to the tab “Ask Anzea” then “youtube channel” you will see we have another video up that way. This problem video is for our home page so we wanted it to look nicer than just a YouTube box thrown on there.

      And like I mentioned in my first post, the home page looks great on Safari and Internet Explorer but not Google Chrome…

      Sorry for the long explanation…Thank you!

    3. Dave Warfel Avatar

      I took a look at your page, and it looks like you’re actually inserting the YouTube video as a “background video.” That was likely an option available in LayerSlider… but I don’t think it’s what you want. Background videos are meant to work just like a background image… they would appear behind something else in the foreground, but would have no functionality associated with them. Yours appears to be set up as a background video, and then there is a link to the http://www.anzea.com/sunbrella-contract/ page over top of the video.

      Try removing the background video (as you have it now). Also look for any link to that sunbrella page, and remove that. Then, for the actual “Content” of your layer, choose Video/Audio, as seen here.

      Let me know how that works for you.

  15. Andy Avatar

    Great post great help! Working on various website aspects, I actually came across your post twice. Congrats on the SEO! :)
    AND I got solutions. Thanks!

    I have the opposite issue of previous person – everything works great on Chrome but not in IE and Firefox.

    https://daveroessler.com/daves-video/ (video page) not working in IE or MS Edge. I use the YotuWP plugin on that page.

    Also, I use the WordPress video widget on sidebar of Blog page – only page, along with posts, that has a sidebar. IE & Edge show “ERROR” while Firefox just cannot play videos or show image of video (nothing happens when I click play).

    BTW – I used “insert a url” for the blog sidebar/video widget.

    I googled it and not much coming up. I would think this would be a common issue considering it’s a common WordPress widget. Realize you are busy and this question may not be inline with the actual post but was at a little bit of a wall.

    1. Dave Warfel Avatar

      Thanks Andy! I’m glad you were able to find some answers to your questions.

      In terms of the issues you’ve mentioned here…

      I tested your video page (https://daveroessler.com/daves-video/) in Chrome, Firefox & Safari on Mac. It works for me in all three. Unfortunately, I don’t have an easy way to test in IE or Edge since I’m on a Mac, so I can’t be of much help there.

      For the blog page (https://daveroessler.com/blog/), the videos play fine for me in Firefox on Mac.

      If you haven’t tried this already…

      • Check Firebug in Firefox, and look in the Console for any errors. Could be a javascript error or some other error causing issues.
      • I assume Edge has something similar. Look in their debug tool for console errors.
      • For the sidebar, the video widget + insert a URL is what I would’ve used as well. But alternatively, you could try using an HTML widget and just pasting the YouTube URL in there. I don’t remember exactly how WordPress parses each of those widgets, but there could be some differences between the two, and one might work better in some scenarios.

      OK, so I just looked at my Firefox debugger, and found some errors. I did some Googling on it, and this is one of many articles that popped up. It could be a server issue.

      Here are the errors I’m seeing:

      • Specified “type” attribute of “video/youtube” is not supported. Load of media resource https://youtu.be/FgxpCOcOSjI?_=1 failed.
      • HTTP “Content-Type” of “text/html” is not supported. Load of media resource https://youtu.be/FgxpCOcOSjI?_=1 failed.
      • Content Security Policy: Ignoring ‘unsafe-inline’ within script-src: ‘strict-dynamic’ specified. Content Security Policy: Ignoring https: within script-src: ‘strict-dynamic’ specified. Content Security Policy: Ignoring http: within script-src: ‘strict-dynamic’ specified.

      You might want to do more research on those errors, but the more I think about it, I’m thinking it’s an issue with the way the plugin is serving up the YouTube videos. I would create a test page and insert two videos on it — 1 by just pasting the URL on a line (i.e. using WordPress’ oembed), and 2, by switching from Visual to Text mode and using YouTube’s <iframe> embed code. Test them in IE/Edge/Firefox and see what happens. Make sure the YotuWP plugin is NOT being used on the page when you test it.

      Also check-in with the plugin developer (if he/she is responsive). Maybe they’ve seen this before.

      Sorry I couldn’t be more help, but since I can’t reproduce it on my end, it’s tough. Good luck, and I’d love to hear how it goes.

  16. Andy Avatar

    Always great help and thank you!

    For the vlog page with video playlist gallery I resolved by simply changing video gallery plugin to YouTube Embed Plugin. Simple and your were on the mark.

    For the sidebar, tested plugins and Fast Velocity Minify was causing issue on sidebar video as well as blocking hamburger menu on mobile.

    Probably issues in conjunction with theme as plugin works on another theme on another website of mine.

    Which is a heartbreaker! Fast Velocity Minify (along with WP Super Cache) jumped Pingdom/GTMetrix/and Page Speed Insights score significantly.

    Reaching out to plugin creator for insight.

    Again, thanks SO much for your quick and helpful info!
    Best, Andy

    1. Dave Warfel Avatar

      Sweet! I’m glad you got it all figured out. And I appreciate you taking the time to share your solutions.

      Also, I love how much you care about page speed. It’s a bummer you can’t use your go-to solution on this project, but if you’re open to considering other performance options, I highly recommend WP Rocket. It’s not free, but it provides more value for the money than almost any other plugin I’ve ever used. It provides both minify & caching options, along with a bunch of other stuff to speed up your site. Their support is fantastic, and they test it alongside a ton of popular hosts & other plugins to make sure there are no conflicts.

      If you’ve got a little extra in the budget, it’s highly worth it (and I’m pretty cheap myself, so that’s saying something ;-)

    2. Andy Avatar

      I don’t look at it as cheap – if you can get it free with a little research, why pay? You know, we got that whole internet thing lying around. :0

      Read and heard great things about WP Rocket but have been able to get job done with free plugins/.htacess additions.

      Found advice from Fast Velocity Minify creator in support forum. He said W3TC was better. Installed and set up, all issues fixed by disabling appropriate minify/inline options to avoid doubling these actions. SWEET!

      Again, thanks so much!

    3. Dave Warfel Avatar

      All good points, Andy.

      Happy coding!

  17. Manu Avatar

    Hi great post

    However I think you forgot about the iframe being responsive nowadays:

    I see some people that add the css in the theme but all together in the html did the job in wordpress.

    div style=”position: relative; padding-bottom: 56.25%;”>[youtube https://www.youtube.com/watch?v=bb_Cv622_Ko%5D

    1. Dave Warfel Avatar

      Good point, Manu. YouTube used to give you the responsive code when you used their embed tool, but they don’t anymore. They just give you the <iframe> code now.

      I prefer to put the CSS in my theme and then wrap every embed in a <div>, but I also recommend embedresponsively.com for the non-technical folks out there.

  18. Marilene Avatar

    Hi, I have a question and I need help. I’m having a website done by a friend. In this website I am going to be selling gold plated jewelry. I want most of my pieces to be displayed in 360 in the website. My photographer said that I need to host the files somewhere so that they can download it me website an be played when my customers visit the product page. In the other hand my friend said that this is not necessary and we can use youtube to download everything in the website. I undertend this com be done but I don’t think we can download all the 360 files from YouTube to the website. Also I don’t think using YouTube for this purpose will allow my costumers to stop, drag, rotate or enlarge the images to view details. Please can help understand if this can really be done using YouTube or not? Thank you so much and forgive me for my poor grammar as English is not my language.

    1. Dave Warfel Avatar

      Hi Marilene — I can confirm that if you use YouTube to show a video of your product in a 360 degree view, the shopper will NOT be able to interact with it using their mouse. They will simply watch the video from start to end, and you (the product owner) would control the movement, spin, speed, etc. of the rotation. The shopper, could, however, rewind & fast-forward the video.

      If you’re using WooCommerce for your shopping cart, you can check out this plugin. It allows you to upload multiple images, and then those images are pieced together to create one 360 degree view image that can be moved via the mouse cursor by the shopper.

      If you go the video route, I would recommend keeping the videos on YouTube, and embedding those videos on your site for your shoppers to watch. If you download the YouTube videos and upload them to your site, you will place a lot of strain on your server, which will cost you more money and slow your site down for your visitors.

  19. Laura A Lynch Avatar
    Laura A Lynch

    Hello, Thank you very much for the information on this topic! It’s very helpful. I’m having trouble bringing it all together and it’s likely my fault. I would like the short video to auto play on a loop and the viewer to have no access to controls. Can I also mute the video?
    Here’s my code:
    .embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

    1. Dave Warfel Avatar

      Hi Laura —

      It looks like your iframe code got stripped out. All that I see is the CSS code that makes the video responsive.

      To do what you’re asking, try the following iframe code:

      <iframe src="https://www.youtube.com/embed/IZuTNOxTA-Q?controls=0&autoplay=1&loop=1&mute=1" width="640" height="360" frameborder="0" allowfullscreen>

      The main pieces of that code that accomplish your desired outcome are:

      • controls=0 removes the player controls
      • autoplay=1 makes the video play upon page load
      • loop=1 makes the video loop and auto-play again after finishing
      • mute=1 will put the video on mute by default

      Just replace the video ID (the part after /embed/) with the video you are embedding.

      * Be careful setting the video to mute AND turning off controls. This means the user will have no way to turn the sound on.

      Let me know how that goes for you.

    2. Laura A Lynch Avatar
      Laura A Lynch

      Thank you for help. I tried your code on it’s own on this page:
      https://gorhammotorinn.pairsite.com/sample-page/ and it doesn’t work? Am I just really thick?

    3. Dave Warfel Avatar

      I think it has to do with the fact that you’re using Beaver Builder. There might be something with how Beaver Builder inserts HTML code blocks that is preventing it from working properly.

      I just tested it by placing the iframe code in the Text (not Visual) part of the default WordPress editor (not using any page builder) and everything works except for loop. However, loop might not work because I am manually navigating through the video, so that might negate the use of loop. But the controls are hidden, it autoplays and it’s muted by default.

      Instead of using the HTML module, try using the Text Editor module and switching from Visual to Text mode. See if that works.

    4. Laura A Lynch Avatar
      Laura A Lynch

      Oh my gosh! Thank you for thinking of that.

    5. Dave Warfel Avatar

      You’re welcome :-)

      I use Beaver Builder on some of my sites so I was able to do a quick test. Glad it worked for ya!

  20. James Wm Frank Avatar
    James Wm Frank

    The youtube embed shows in Text in WP. It only shows for a second in Visual before disappearing and the frame edge appears only. It worked before the site was migrated through Plesk panel. It seems like a permission issue. Got any ideas?

    1. Dave Warfel Avatar

      Hi James — Sounds more like a plugin or theme conflict to me.

      • What other plugins do you have installed? More specifically, ones that might impact the editing experience?
      • Anything for enhancing TinyMCE?
      • Are you using a page builder?
      • What theme are you using?

      Any way you can share a screenshot of what is happening or what it looks like?

    2. James Wm Frank Avatar
      James Wm Frank

      I tried a number of things since the site was migrated by Plesk to get a return to the functionality I had on a previous hosting server. Only two plugins, PDF reader and share buttons. Theme Twenty Seventeen. On the previous hosting server, the embed link address worked easily and for many years. Once the site was migrated the embed links that worked before showed up like this snippet:
      and this snippet in text view:
      I somehow believe this is a permission problem at the server level, however, hosting thinks it’s a coding problem.
      Any suggestions are much appreciated.

    3. Dave Warfel Avatar

      I think it’s a coding problem, and does not have anything to do with your hosting.

      What you’re describing is images being displayed instead of a video. There has to be some plugin or coding issue that is causing this.

      Have you tried creating a new, blank page, and embedding a YouTube video on it? Does that work? Or does that also convert the video embed into an image URL like you’ve described above?

  21. Kristine McCormick Avatar
    Kristine McCormick

    Is there a way to embed multiple YouTube videos in the same post?

    1. Dave Warfel Avatar

      Sure. Just simply choose one of the methods in this article, and repeat it. There is no limit to the number of YouTube videos you can embed in one post.

  22. Sahid Avatar

    Hello Admin, can i embed download link to video so user don’t need to go at Youtube instead he just download from website directly. is it possible?????

    1. Dave Warfel Avatar

      Sahid — I’m not aware of any way to embed a download link for a YouTube video. I don’t think it’s possible.

      The only way to download a YouTube video is if you’re the one who uploaded it.

  23. Raja Avatar

    How can i use many commands like using rel=0 also use end=82 etc. Also whenever i adjust the width and the height the changes are only showing in the visual not in the preview. Please help

    1. Dave Warfel Avatar

      Raja — For the embed URL, just separate each command you’d like to use with an ampersand (&).


      As for width and height not working, that is likely because of your theme overriding the width & height. Also, I think the newest version of the YouTube embed code actually includes code that makes the video responsive… so you might not be able to control width & height anymore (if you’re using the default code). You might need to strip some code out of the default embed code.

  24. Raja Avatar

    Thanks a lot, but how do you strip some code?

    1. Dave Warfel Avatar

      I just checked YouTube’s current embed code, and it actually doesn’t include any extra code. So the width & height parameters SHOULD work, assuming your theme isn’t overriding them.

      As long as your embed code starts & finishes with <iframe> and </iframe>, it should work:

      <iframe width="560" height="315" src="https://www.youtube.com/embed/XLCkDWc8iLI" frameborder="0" allowfullscreen></iframe>

  25. Chaya Avatar

    My videos were all displaying well and then I added some more and all of a sudden they all have a 500 internal service error no matter what I do. Any idea why?

    1. Dave Warfel Avatar

      YouTube is down nationwide right now. No one can see any videos. Your videos will return as soon as YouTube fixes it service.

  26. Matt Avatar

    Is rel=0 disable from yt?

    1. Dave Warfel Avatar

      Hi Matt — YouTube made a change on September 25 of this year. It is no longer possible to disable related videos.

      However, using rel=0 now means that YouTube will show related videos only from your channel. So it still has some value, but it will not disable related videos anymore.

  27. Paul Avatar

    Hi Dave – thanks for this article. First place I have seen that has confirmed the change regarding related videos. On an embedded YouTube video I am using, ‘rel=0’ doesn’t seem to be only showing videos from my channel – could it be that there’s not enough videos in the channel to fill up the quota of related videos? What displays on your very first video on a channel? Is there any way to avoid ‘related videos’ as a default (paid accounts, ad blockers or whatever)? Thanks. Paul

    1. Dave Warfel Avatar

      Hey Paul — Yeah, the change took place on September 25, 2018 (confirmed directly from YouTube on this page).

      I tested out rel=0 with a channel that only has 3 videos. The results surprised me. When I used the embed code WITHOUT rel=0, the video played fine. I got related videos from other channels.

      When I added rel=0 to the end of the URL, I actually got a playback error, and could not even play the video. This seems pretty harsh to make the video unavailable just because your channel doesn’t have enough videos to fill up the related videos suggestions… but that’s what appears to be happening. So be really careful with using it if you only have a few videos. I’m not sure how many videos you need to make sure your video is playable with rel=0. My guess is 6 or 8.

      Unfortunately, I’m not sure of any way to regain this functionality. From the language in YouTube’s announcement, it seems like they are trying to create a more unified experience, and they believe always showing related videos is important.

  28. Sajib Avatar

    Hi there,

    How do I include multiple (such as loop and autoplay and hide controls) at the same time? All of the examples show only one per URL. What if I want more into a single embed?

    1. Dave Warfel Avatar

      Hi Sajib — You separate each additional parameter with an ampersand (&). So your URL would look like this:

  29. Ginevra Avatar

    Hi there,
    i have the youtube link on my header, the theme is astrid, and it now shows my youtube channel image, share and whatch later, after putting the codes you wrote here it doesn’t autoplay and when i press the play button it says “An error occurred. Please try again later. (Playback ID: 6NVQbed8MbY0CwUe)
    Learn More”.
    I can’t solve the problem! What can i do?
    Thank you very much for your usefull help.

    1. Dave Warfel Avatar

      Ginevra — Can you view the video directly on YouTube? If you get the same playback error when trying it on YouTube, then the problem is with the video itself, not with how you embedded it. Try uploading it again.

      If not… Can you please post a link to the page where you have the YouTube video embedded? I’ll take a look.

  30. Yizeth Ruiz Avatar
    Yizeth Ruiz

    Buenas tardes, quisiera pedir asesoría sobre cómo hacer que un video incrustado en wordpress usando Qode Video Box, pueda reproducirse automáticamente al darle clic el botón generado por Qode. Actualmente a parte de darle clic al botón de Play generado por Qode Video Box, también tengo que darle clic al botón de Play de Youtube.

    1. Dave Warfel Avatar

      No estoy muy familiarizado con Qode, pero creo que cuando usas un Video Box de Qode, tiene que ser así. Si desea que el usuario solo tenga que hacer clic una vez para reproducir el video, deberá utilizar el método de shortcode o iframe.

  31. Swen Faber Avatar
    Swen Faber

    Hi Dave, you have a nice article about the YouTube videos. I use the methode on my website. This works quite well however after 2 weeks the video dissapears from the one day on the other and I have to place the link again in the text box.

    Do you have any ideas how to fix it that the link will stay?

    With kind regards,


    1. Dave Warfel Avatar

      Hi Swen. Which method are you using?

      Just inserting the video URL on a new line? Or are you using the <iframe> method?

      Either way, I’m wondering if it has something to do with switching back and forth between “Visual” and “Text” modes. Are you switching at all, or do you always use “Visual” mode?

      It’s also possible that your theme is causing an issue. Which theme are you using?

    2. Swen Faber Avatar
      Swen Faber

      Hi Dave,

      I am using the method on the text block. Actually, I am not switching from “Visual” to “text”. I am only using the “text” block.

      I use the Neighborhood theme, https://themeforest.net/item/neighborhood-responsive-multipurpose-shop-theme/5086341.

      With kind regards,

    3. Dave Warfel Avatar

      I’m not sure what’s going on, Swen.

      Once you add the <iframe> code to the “Text” tab of the editor, it should stay there. The only things that I can think of that would cause a problem are either a theme or plugin conflict. If you use any plugins that might affect the editing experience, TinyMCE, etc., try disabling them and see if the issue persists.

  32. Swen Faber Avatar
    Swen Faber

    Hmmmm… thank you for the info. I will give it a try however I do not think I can find it.

  33. Kristen Whittley Avatar
    Kristen Whittley

    Hello, this is very helpful but I’m still having an issue. I’m trying to autoplay and loop a video on our church website. It seems to autoplay but will not loop… Any idea what I may be doing wrong? Here’s the code I’m using:
    [youtube https://www.youtube.com/watch?v=npGiXlEjVvM?autoplay=1&loop=1&w=560&h=315%5D

    1. Kristen Whittley Avatar
      Kristen Whittley

      Looks like my code didn’t paste properly, should be:
      iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/npGiXlEjVvM?autoplay=1&loop=1″ frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen>

    2. Dave Warfel Avatar

      Hi Kristen — I’m not sure exactly what’s going on, but I found this on YouTube’s website. It mentions that the loop parameter doesn’t always work with the <iframe> embedding method:

      “Note: This parameter has limited support in the AS3 player and in IFrame embeds, which could load either the AS3 or HTML5 player.” (source)

      I think this could be the issue.

  34. Kristen Whittley Avatar
    Kristen Whittley

    Hmm, I’m a novice at this. Do you have another suggestion or route to go to accomplish this since this isn’t working?

    1. Dave Warfel Avatar

      I don’t. I’m sorry. I’ve only ever needed to use the iframe embed method. And that’s all I know how to use.

      They have an entire JS API. Maybe you’d need to use that. But that’s beyond my level of expertise. You’d need to hire a JavaScript developer to build something custom for you.

      I wish I had a better answer 😕.

  35. Kristen Whittley Avatar
    Kristen Whittley

    Thanks for your help. I clicked the YouTube source you shared and found I needed to add “&playlist=” with my video ID and it worked! Well, it works on desktops but it only loops and does not autoplay on mobile devices. It’s progress though. Thanks again.

    1. Dave Warfel Avatar

      Great news! I saw that piece about the playlists but figured if you were just adding a single video, the playlist stuff wouldn’t apply.

      I’m glad you tried it :-)

  36. Scott Avatar

    I have a sidebar video I added with the widget same way as you showed – is there any way to have it autoplay once the page is brought up?

    1. Dave Warfel Avatar

      Hi Scott. Not with the “Video” widget, but you can if you use a “Custom HTML” widget.

      In the Custom HTML widget, insert the embed code you get from YouTube when using the “Share” link, and add ?autoplay=1 to the end of the src attribute. It will look like this:

      <iframe width="560" height="315" src="https://www.youtube.com/embed/abc123?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

      Replace abc123 with your video ID.

  37. Steve Avatar

    I can embed videos in all the ways, but how can I change the display image that appears in my wordpress site? I start the video three seconds in, but the initial first frame still is what displays to visitors of my site and I want to change that.

    1. Dave Warfel Avatar

      If you own the video, you can upload a custom thumbnail image that will display before the user presses play. But if the video is not yours, the standard method of embedding a YouTube video will show whatever the owner has set as the default thumbnail.

      If you use a plugin or page builder to insert YouTube videos, some of those allow you to upload & show your own image. I know Elementor is one such page builder. And I think some video lazy loading plugins might let you choose your own, as well.

  38. Kyle Avatar

    A live stream embed code is not working on my wordpress website. It redirects the viewer to youtube. Am I missing something that we can do to make the livestream link playable on the website.

    1. Dave Warfel Avatar

      Hey Kyle — The two biggest reasons why embedded YouTube livestreams don’t work are:

      • you need to connect your channel to an AdSense account
      • you should use your channel ID when embedding the livestream

      This article explains in more detail. And I’d recommend using the iframe method.

  39. Niels Avatar

    Thanks for your sharing. I have a question though. What method can I apply to disable links on my videos? I don’t want users to click on the Youtube link and get taken away from my website
    users can’t click on the Youtube link and get taken away from your website.

    1. Dave Warfel Avatar

      Niels — Users can click the video title at the top of the video and get taken to youtube.com to finish watching the video there. And there’s no way for me (or anyone) to control that.

      As of September 25, 2018, YouTube disabled the ability to be able to remove it. Here’s their quote:

      “The showinfo parameter, which indicates whether the player should display information like the video title and uploader before the video starts playing, is also being deprecated. Following the change, the channel avatar and video title will always display before playback begins, when playback is paused, and when playback ends. The avatar being displayed is new behavior that will be consistent across all embedded players.”

  40. johan Avatar

    Many thanks for your tutorial. Do you know, if it is possible to randomize the video’s in the list when the website starts?

    1. Dave Warfel Avatar

      In what list? Are you embedding a playlist or a single video?

      If you’re referring to playlists, than no, I don’t think there’s any way to randomize the videos.

  41. ALef Avatar

    How can I embed video with subtitles on my website please?
    I can not fine anywhere

    1. Dave Warfel Avatar

      ALef — Subtitles are managed in the YouTube interface, where you upload your video. They are not something that you display on your website when embedding a video. Look in your YouTube settings where you would edit other video information, like the title, description, etc. There should be an option to either write your sub-titles manually, or upload a file.

  42. Tonye Oliver Avatar
    Tonye Oliver

    Hello Dave, thank you for your posts on the subject, but I have a problem, when i embed my YT video using the embed code on visual editor, it previews quite well but vanishes when i publish to post.

    When i use the post url option, it shows up on the post but not on the review.
    How can i get round this, didn’t use to do this

    1. Dave Warfel Avatar

      Hi Tonye,

      I’m not sure. It’s likely due to either your theme or a plugin. Your best bet is to disable the plugin(s) you think might be related.

      After that, maybe hire a WordPress developer to look at it for you.

  43. Sayidismail Avatar

    Thanks sir it’s very helpful

  44. Tim Brown Avatar
    Tim Brown

    The embed option is not responsive, so it does not work on mobile platforms when the device size changes. Any suggestions

    1. Dave Warfel Avatar

      Hi Tim – This article outlines some older methods for embedding a YouTube video with WordPress.

      Are you using the new block editor (aka: Gutenberg)? If so, you should use the “YouTube” block to embed the video. Just paste the video URL from your browser, and as long as you’re using a properly coded WordPress theme, the YouTube video should be responsive on all devices.

      Let me know what editor you’re using and how exactly you’re inserting the video if you need further assistance.

Leave a Comment