Recently, UK Case Lady asked me how to embed video in a Wordpress blog.
For the record I do not have a Wordpress blog and am relying on the embedded video above and a few quick glances at some other resources for my answer. Therefore I am unable to test this myself, but hopefully the UK Case Lady can jump back in. When I have more time I will look more deeply into this to give a more thorough response that includes how to do embed content with or without a plugin and with the rich editor.
The problem is the rich visual editor referred to elsewhere as a WYSIWYG or Rich text editor in Wordpress. By turning off the rich text editor you can embed video without any problems.
Before logging in to the administrative interface of your Wordpress blog, there is a checkbox option that says, “Use the rich visual editor when writing.” Uncheck that option and you’ll be able to paste embedded content directly into your blog.
To understand the problem you need to know what a rich visual editor is. When you view a web page your browser retrieves the page and interprets the HTML and Javascript code into something visual and friendly that does something. If you have never done it, right click (option-click) on a web page in your browser and choose “view source” or “view page source.” This will open another window displaying the code that is required to render the visual version of the page in the browser.
Rich visual editors or WYSIWYG editors allow an individual to skip the process of writing any funny codes to format their page or post into HTML.
Unfortunately, WYSIWYG style editors, especially those that operate on a web page, tend to eat up, destroy, and even intentionally remove actual HTML that might be entered in the visual editor. This appears to be exactly what is happening in Wordpress blogs. When you paste in the embed code from YouTube (or any other embeddable content or widget that uses either the “embed” tag or the “object” tag (html tags) they are stripped out or otherwise reformatted/rewritten so as to make them non-functional when the Wordpress blog post is viewed.
So the solution is to disable the WYSIWYG editor while posting and editing blogs that require embedded content, such as a YouTube video.
The downside is that when you disable the editor you will now have to manually code/format your post. In Wordpress, much like at CoTradeCo, there is still an editing toolbar that will add the “code” in for you, but you will not be able to see the formatting as you do it, only the “code” that represents the formatting.
You can turn visual editing back on as long as you do not edit any posts with embedded content. Just remember to disable visual editing if you need to post new embedded content or a post with embedded content.
And that is how you can get around not being able to install a plugin. Apparently there are several plugins that allow for pasting embedded content into the visual editor without “eating it up.” But I’ll try to talk about that in another post or in the comments here another time.
Hope this helps you out.
© 2007-2012 CoTradeCo, Coachella Valley Packaging, & Coachella Valley Trading Company
are part of the Shorebird Corporation
Community content is all rights reserved © by the contibutor of that content granting
CoTradeCo some limited non-exclusive usage rights, see our policies.