You don’t need a plugin to get videos into WordPress 2.6
Sunday, September 21st, 2008YouTube, MetaCafe, Google videos. We love them.
Anyone who has been using WordPress knows what a pain in the butt trying to get videos into your post can be. The WordPress WYSIWYG editor strips essential tags from the code when you go into code view, paste the code, then go back into the visual view.
Past versions of Wordpress didn’t behave nicely no matter what you did, and people needed plugins that did interesting workarounds to get embeds to work properly.
While WordPress 2.6 support for videos using its editor still bites, there is a far easier workaround to getting the videos to embed and not break when you go back to Visual view.
To get a YouTube or other video into your post, do the following.
1. Copy the code that the site lists as its embed code. That code will look something like this.
<object width=”425″ height=”344″><param name=”movie” value=”http://www.youtube.com/v/YLDbGqJ2KYk&hl=en&fs=1″></param><param name=”allowFullScreen” value=”true”></param><embed src=”http://www.youtube.com/v/YLDbGqJ2KYk&hl=en&fs=1″ type=”application/x-shockwave-flash” allowfullscreen=”true” width=”425″ height=”344″></embed></object>
2. Go to your blog post and pop into the HTML view.
3. Paste the copied embed code.
4. Remove everything that isn’t part of the actual embed tag. You’ll end up with this.
<embed src=”http://www.youtube.com/v/YLDbGqJ2KYk&hl=en&fs=1″ type=”application/x-shockwave-flash” allowfullscreen=”true” width=”425″ height=”344″></embed>
Now when you switch into Visual view, you’ll see a little yellow box that appears to be a broken Flash object. However, it isn’t broken. If you switch back into HTML view, you’ll see Wordpress added back the object tag and associated code.
You can now switch back and forth from Visual to HTML view with no problems, and when you publish your post, the video will link in just fine. Like so.
Hope this helps someone else. If it did, please share using your favorite bookmarking site below.

The best license agreement ever is brought to you by the 


