YouTube videos

Can someone please tell me how to post a YouTube video to my WordPress blog? Can I post a YouTube video to one of my pages also? What about posting multiple videos displaying in the same area?

You can post as many YouTube videos you like on all the pages you want, not only on the blog.

For this page you will need the Raw HTML plugin.
Visit the Plugins FAQ for more informations.

Chapter 1: Posting single videos
Chapter 2: A way to post multiple videos

Chapter 1: Posting single videos

1. Let’s say you want to add the following video to your WordPress webpage
http://www.youtube.com/watch?v=BuoTuL1we_c

2. Copy the “Embed” you find on the right of the video you chose. For the video I chose it is:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/BuoTuL1we_c&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/BuoTuL1we_c&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

3. Go to WordPress and the page you want to add the video to (Any page you want)

4. Paste the code you copied from the YouTube site (the whole code you find under Embed)
into the post

5. Done

Chapter 2: A way to post multiple videos

Basically it works just the same as the multiple iFrames work (Chapter 2 of the iFrames FAQ)

You have two parts. The first one will be the menu from which people will be able to choose a video they want to look at, the second one where the video will be displaying.

<a href="http://www.youtube.com/v/D1R-jKKp3NA&rel=1" target="Showframe" class="class1">Steve Jobs</a><br>
<a href="http://www.youtube.com/v/BuoTuL1we_c&rel=1" target="Showframe" class="class1">Katie Melua</a><br>
<a href="http://www.youtube.com/v/nxpEqln5EdQ&rel=1" target="Showframe" class="class1">"George Bush"</a><br>
<a href="http://www.youtube.com/v/9NaMGL0B50c&rel=1" target="Showframe" class="class1">Almost Famous</a>

Notice the http://www.youtube.com/v/BuoTuL1we_c&rel=1

Where can you get that from?

This is the code You Tube provides you to embed the video:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/BuoTuL1we_c&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/BuoTuL1we_c&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

in there you see the links. Just copy and paste the link into the menu.

Here’s the code of the area where the videos will display in:

<iframe
name="Showframe"
style="width:345px; height:290px;"
src="url of the video first loading" class="class1">
</iframe>

Change the URL in this piece of code to the web address of the video you want to display when the page loads.

Choose the video you would like to watch from the following menu:

Steve Jobs
Katie Melua
"George Bush"
Almost Famous

Note that the video is taking its size from the sizes you type in this second code, so changing the width and/or height in this code will change the size of the video appearing on the page.

Read Chapter 1.3 of the iFrames FAQ to know how to customize the iFrame.



WordPressFAQ.org – Tutorials, Tips & Tricks is made with and for WordPress.
It’s presented by Cédric and hosted by HostExcellence.com
I would like you to give me feedback on this page by commenting in the appropriate section of the Forum. Tell me if it’s been helpful. If it wasn’t please tell me why. If you think something is missing please tell me what. If you have questions about it post them there and I will probably try to give you an answer.
Thank you for visiting and supporting my website.

- Cédric -
  • Share/Bookmark
This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.