Found a great YouTube video you want to share but you aren’t sure how to get it into your blog post?
If you’re using WordPress, here’s what to do step by step:
1. Install the WordPress Video Plugin
You can find it at http://wordpress.org/extend/plugins/wordpress-video-plugin/ or by going to “Plugins” -> “Add New” and searching for “WordPress Video Plugin”
2. Find the ID of the YouTube Video
To find the ID of the video you want to embed, go to the video and click the “Share” button below the video. Then look at the shortlink and everything after the http://youtu.be/ part is the ID.
In this case it’s: jeT9haiWh8E
3. Add the shortcode to your blog post and save.
Edit the blog post where you want to include the video using the shortcode:
[*youtube jeT9haiWh8E*]
(without the * – I had to add those so the plugin wouldn’t embed the video above)
And that’s it! You’ll have an embedded video in your blog post.
Here’s this plugin in action:
Danny says
I actually use Window Livewriter for writing all my blog posts. It has a add-video feature built in. Livewriter also downloads your wordpress template look-and-feel so you get to see what your page will look like before you publish it to your blog. You need a Windows deskop of course, not Mac or Linux.
Michelle Shaeffer says
I usually blog on my MacBook so I hadn’t really explored it, but I think that program came installed on my desktop PC. I’ll have to check it out. Thanks for the tip, Danny.
Lisa Rothstein says
I don’t have the plugin and have just used the embed code in my posts — the videos show up and play…but sometimes they disappear! So maybe the plugin will stop this mystery from happening?
Also, other sites besides youtube have their own players — I like sharing videos from TED, one of which I believe is in my latest post, below.
Lisa
Michelle Shaeffer says
It’s the code-eating monster! Seriously though, WordPress’ html editor does eat code, especially iframes if it’s the YouTube iframe embed version. The older embed code seems to stick around better for me. But I use this code in my functions.php file to stop it:
function mytheme_tinymce_config( $init ) {
$valid_iframe = ‘iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]’;
if ( isset( $init[‘extended_valid_elements’] ) ) {
$init[‘extended_valid_elements’] .= ‘,’ . $valid_iframe;
} else {
$init[‘extended_valid_elements’] = $valid_iframe;
}
return $init;
}
add_filter(‘tiny_mce_before_init’, ‘mytheme_tinymce_config’);
Sheila Atwood says
Michelle,
I have been using the old way to embed YouTube video until recently. Now I use the short code – so far so good. But I like the idea of adding the your code in the functions.php. Would you use that instead of the
plugin?
Michelle Shaeffer says
I go back and forth. I should probably pick one method and stick with it though… LOL
Kristina L. says
Hi, Michelle,
this is very useful and very well explained. The steps seem easy to be followed and I am sure that many of the bloggers, especially beginners will find it helpful. Usually, most persons I know use the short code for adding the video, but there are more ways to manage with the video.
Michelle Shaeffer says
Thanks, Kristina. :)
Jeremiah Johnson says
This is so strange. I was just getting ready to do another post to my blog and I was researching how to add video from YouTube on it. I have never done this before and all I have to say about this is YOU ROCK! I know exactly how to do it now. Thank you so much.
Jeremiah
Michelle Shaeffer says
Awesome, glad this came at the right time for you. Thanks for commenting, Jeremiah.
rinkoo wadhera says
great info michelle …thanks