Adding Video (YouTube or Google)

To add an embedded video from a site like YouTube or Google Video, you need to first look for the embed code on the video’s homepage. If someone has embedded a video that you like on their website, usually clicking on it will bring you to the video’s homepage on YouTube/Google Video.

On YouTube, if embeds are allowed for that video, you’ll find the code in a box called “embed” next to the video. For example, if you go to the homepage for this silly pug video, you’ll find this bit of code under “embed”:

<object height=”350″ width=”425″><param name=”movie” value=”"><em>=”http://www.youtube.com/v/l9l19D2sIHI”&gt;</em><param name=”wmode” value=”transparent”><embed xsrc=”http://www.youtube.com/v/l9l19D2sIHI” mce_src=”http://www.youtube.com/v/l9l19D2sIHI” type=”application/x-shockwave-flash” wmode=”transparent” height=”350″ width=”425″></object>

How to find the embed code for YouTube

You’ll need to copy and paste this into your html (not rich text) editor. If you’re using the rich text (visual rich) editor which is the default option, you’ll need to click on the button that says “html” and paste it into the popup window and then hit Update. WARNING, it can do strange things to your layout if you cut and paste straight into the rich text editor (if this happens, delete the post).

HTML button in Rich text editor

In Performancing, the rich text editor is the tab with “A” on it, the html editor is the tab “<A>” - the html tab is the one you want to paste this video code into.

Performancing HTML Editor tab

In Google Video, you have to click first on a big blue button next to the video that says “Email-Blog-Post to MySpace” and then click on the “Embed Link” link and you’ll find a box appear with the embed code to copy and paste. For example if you go to this Google video ad for the 2006 Machinima.org comp, you’ll find the following embed code:

<embed style=”width: 400px; height: 326px;” id=”VideoPlayback” type=”application/x-shockwave-flash” xsrc=”http://video.google.com/googleplayer.swf?docId=-5049322100593461897&amp;hl=en-AU” mce_src=”http://video.google.com/googleplayer.swf?docId=-5049322100593461897&amp;hl=en-AU” flashvars=”">

How to find the embed code for Google Video

You’ll need to copy and paste this into your HTML editor just like the YouTube video explained above.

BEFORE you attempt this, a big word of WARNING. There is a big bug in some versions of WordPress (including the current versions 2.x) which means when you paste the embed code in the html popup in the rich text editor, the embed copy and paste just disappears once you hit “Update” so you can’t embed any video. If you find this is happening and you probably will, either just use Performancing (remember to paste it in the html editor tab) or you will have to play around with your WordPress settings to switch off the rich text editor. Go to Options/Writing Options and make sure “Users should use the visual rich editor by default” is UNCHECKED.

The Visual Rich Editor is swiched off

Then hit “Update Options” and you should be able to paste your embed code straight into your post and have it show up (remember there is no html popup because you are editing the html already). When you’ve got your video up, you might like to go back to Options/Writing Options and reselect the visual rich editor. But beware, sometimes going back and editing your post in the visual rich (rich text) editor can cause some strange errors. If that happens, delete the post and start again in the html editor.

Here’s the YouTube video:

Here’s the Google video:

Post a Comment

Your email is never published nor shared. Required fields are marked *

*

*