Embed YouTube video in a widget
Sometimes, you want to embed a video in a specific post. Other times, you want the video to stay ‘in view’ for longer than a single post might allow.
One option is to embed the video in a widget. The procedure is the same as for embedding in a post, except that you’ll need to specify the smallest size available.
Here’s the 2013 Summer Reading Program video on YouTube:
Look for the “Share” link below the video, click it, and then click “Embed”:
In the “Video size” dropdown menu, select “Custom size” and enter the width (in pixels) in the first box. The height will auto-fill, maintaining the correct ratio.
Make sure the “Show suggested videos when the video finishes” box is UNchecked! This prevents random promotions from displaying at the end of your featured video.
Then copy the code that was automatically created (highlighted in yellow above), and paste it in a text box widget in your WordPress site.
The result is a little video on your site that won’t drop out of view as you add posts!
One thing to watch for, though – you’ll need to keep in mind that not all sidebars are created equal. In the theme shown below, the sidebar width is about 180 pixels, and the video is 200 pixels wide, which leads to an awkward overlap. 200 pixels is the minimum size YouTube allows for this function!
In this case, it might be better to embed the video full-size on a Summer Reading Program page. Just play with the options and decide what works best for YOUR site!