Embedding YouTube videos in WordPress MU

June 16, 2009 by  
Filed under Scripts and Coding, Wordpress

wp-mu-logoAfter working with WordPress Mu, I found that I was unable to embed YouTube videos into a post. Instead, WordPress MU would strip my content out without any warning. After surfing around, I found the solution here:

Fix for including YouTube videos in posts in WordPress MU

To make the fix, open wp-includes/kses.php.

Look for:

if (!CUSTOM_TAGS) {
$allowedposttags = array (

and Add:

'embed' => array (
'style' => array (),
'type' => array (),
'id' => array (),
'height' => array (),
'width' => array (),
'src' => array ()),
'object' => array (
'height' => array (),
'width' => array ()),
'param' => array (
'name' => array (),
'value' => array ()), 

to allow embedding of videos.

You can do the same for other HTML codes like

Related Products:

Wordpress for Beginners: A Visual Step-by-Step Guide to Creating your Own WordPress Site in Record Time, Starting from Zero!WordPress for Beginners: A Visual Step-by-Step Guide to Creating your Own WordPress Site in Record Time, Starting from Zero!

WordPress for Beginners - WordPress v4.x
A Visual Step-by-Step Guide to Creating your Own WordPress Site in Record Time, Starting from Zero!Read More >

Build your own WordPress website: An ultimate guide for small business ownersBuild your own WordPress website: An ultimate guide for small business ownersLet’s learn how to build a WordPress website together! Even without any prior computer knowledge, you can learn how to create a blog that is optimiz... Read More >
Professional WordPress: Design and DevelopmentProfessional WordPress: Design and DevelopmentThe highest rated WordPress development and design book on the market is back with an all new third edition.

Professional WordPress is the only Wo... Read More >

Related Posts Plugin for WordPress, Blogger...
  • http://smilepls.com/ Ramnath

    Just what I was looking for.