How to Embed a Video Into a WordPress Post

Have you ever had a video that you wanted to display on your WordPress blog? But after you have taken the embed code from YouTube, (which now uses the iFrame code) and pasted it into your page or post editor in HTML view, just to have WordPress strip the code out and not have your video display.

This has frustrated many WordPress users even myself. The problem lies deeper into the way WordPress handles iFrames… meaning that they do not allow it. So you will be left frustrated if you continue to try embedding your videos this way. What I am going to share with you today is the solution for this discrepancy in WordPress.

Let’s start showing you how to grab the correct embed code.

The first thing you want to do is go to you tube and find the video that you want to embed. Once you have found the video that you want to embed in your WordPress, there will be 3 buttons directly below the video.

  • Like
  • Add To
  • Share

The button that you will be concerned with is the Share button. You need to click on the share button and it reveals in a dropdown fashion a few options.

  • Embed
  • Email this video

To the right of these 2 buttons will be 2 icons ( Facebook and Twitter) just for reference. Now, the one that you will be concerned with is the Embed button. Now you need to click on the Embed button. This will then display a text box with the iFrame code. You do not want this one.

If you look just below that box you will see 4 checkboxes

  • Show suggested videos when the video finishes
  • Use HTTPS
  • Enable privacy-enhanced mode
  • Use old embed code

You need to now click on the “Use old embed code” checkbox to select it. This will then reveal the old embed code in the text box.

Now you are home free. From here, all you’d do is copy the old embed code and paste it into your WordPress editor while still in HTML view and WordPress will not strip out the YouTube code.

So, when you get stuck and frustrated with your videos being stripped, just refer back to this article as you guide to freedom from stress. Why WordPress does this… I do not know. The only thing I now is how to get around it and make it work.

Categories: Web Development

Tags: ,,,,

Leave A Reply

Your email address will not be published.