How to embed Google Video/YouTube into your Wordpress blog without breaking validation
- 1 Comment
Some time ago I noticed that whenever I embeded Google video into my blog it wouldn’t work. Wordpress seemed to garble it upon validation. I finally found out how to get it to work. Admittedly I didn’t research it very much initially and went without video, but a few days ago I felt motivated to share a video in the Design Cities for People, Rather than Cars blog entry. So I found the solution.
On Google Video or YouTube find the embed code for the video. From the code grab the url and insert into the below code. It should validate fine with Wordpress. I can’t vouch for other blogging software, but my guess it will work as is.
<object type="application/x-shockwave-flash" data="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" width="400" height="326"><param name="movie" value="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" /><param name="FlashVars" value="playerMode=embedded" /></object>
When using this method you won’t be forced to use a Wordpress plugin. However it is a bit lengthy.
An easier way via plugin is to download the Google/Youtube plugin developed by Oz. Install is very simple. Simple extract the myvideo.php file into your plugins directory, go to your Wordpress plugins page and activate it.
Using the myvideo plugin
“[ google ] docId [ /google ]”
e.g [ google]-3057280178909051497 [ /google]
without the spaces.
Below is the result
[youtube]Q1ZeXnmDZMQ[/youtube]
For google simple replace youtube with google in your tag.
1 Comments on this post
Trackbacks
-
Thoniousstots said:
Hey,
I am, Richard
good overall content
check out my page:October 20th, 2008 at 8:30 pm
