In our last post, we learned how to insert a video into a post. Inserting a video in your sidebar or your home pages is pretty easy. While there are some plugins out there that will do this, I prefer to use our trusty old text widget. We’ll use a beautiful YouTube video called Murmuration. Tess Wixted introduced me to this video in November of 2011. We’ll place this video into our sidebar. The same procedure can be used to embed the video on your home page.
Here’s how!
Step 1
Surf to YouTube and search for “murmuration official video”. Once you have clicked on that video (or any YouTube video), you will see sharing options under the actual video.
- Click on Share
- Click on Embed
- On the Video size drop-down, select custom size and then type in the width that you want for your video. YouTube will figure out the depth. You just need the width, in this example, 265 pixels. (I’ll speak more about width at the end of this post.)
- Optionally, un-check the ‘Show suggested videos when the video finishes’ option
- Copy the code in the window as we will want to paste that in a minute.
Step 2
On your dashboard, surf to Appearance / Widgets
Open your primary sidebar by clicking the little down arrow on the right hand side.
From the Available Widgets, find your Text widget, drag into the primary sidebar and drop it where you want it to be.
Now paste the YouTube code into the Text widget as shown below. Give it a title if you like. This is optional.
Note: I have added the centering code <center> at the beginning and </center> at the end. I did this because I wanted the video nicely centered in my sidebar. This is totally optional.
Click Save. Your done!
Now look at your website and see how it looks.
Troubleshooting and Tweaks
Some hosts do not like iframe code. If so, your video will not show up. No problem! Go back to step one. Do everything exactly the same way but this time select ‘Use old embed code’. Use this code instead in your text widget.
About the Width
How wide to make your video is determined by how wide your sidebar is, or in the case of your home page if you wanted to show it there in a larger area, how wide that widget container is.
For StudioPress themes, for sidebars, I suggest you start at a width of 250. Have a look at the result. If it looks like you could go wider, try 270. Keep playing with it until you find a width that works. Now write that down somewhere so next time you do this, there is no guess work. For your homepage, try 500 for your width and adjust accordingly. Again, make note of that number.
Did You Notice?
Did you notice that the video we used as an example is in the sidebar of this post? Scroll up and look on the right hand side. Now check this. Surf to the home page or any other post. POOF! The video is gone! Where did it go? HOW did I do that?
Not tellin! 😛
Ok ok … I’ll tell you all about that in a post soon!
Have fun with videos!
Leave a Reply