How to Embed a YouTube Video in WordPress blog and theme

If you want to add the youtube or google and any third party video in wordpress. It is really easily achievable.

WordPress itself provides to upload and submit youtube video in wordpress post. Just open wordpress admin panel and click on Add new post button.

Select the From URL tab. Paste the YouTube video’s URL into the URL field. Then click the Insert into Post button.

You can change the height and width of video using following code

[ youtube=http://www.youtube.com/watch?v=H2Ncxw1xfck&w=320&h=240]

I suggest to use Viper’s Video Quicktags wordpress plugin. I really like this wordpress plugin for embedding the third party video in wordpress blog or post.

You can download this plugin from following URL:

http://wordpress.org/extend/plugins/vipers-video-quicktags/

This plugin give you really great control with video player and size of video player. After installing the plugin you will find the “video quicktag” option in setting tab. Screenshot as follows:

Open the add new post tab, you will find very cool options for adding the video in post.

You just need to add the video URL in the dialog box.

You may like following Articles!

24 thoughts on “How to Embed a YouTube Video in WordPress blog and theme

  1. Pingback: How to Embed a YouTube Video in WordPress blog and theme … | bllogger

  2. Great, very useful, thank you!!

    Could you write the code to get the first thumbnail from all image posts? (not just from the home page)

    Thank you very much!

    Sabella

    • Use following code:
      global $post;
      $first_image = '';
      $all_images = preg_match_all('/<img.+src=[\\'"]([^\\'"]+)[\\'"].*>/i', $post->post_content, $take_images);
      $first_image = $take_images[1][0];
      echo $first_image;

      If you want more information then get back to me

  3. This is a very good article. It seems like you did you research and it is very informative. Thanks a lot and I’ll subscribe to the blog so I can keep reading. Regards, A Fellow Blogger

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>