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 2017: A Visual Step-by-Step Guide to Mastering WordPressWordPress for Beginners 2017: A Visual Step-by-Step Guide to Mastering WordPress

Master WordPress using our step-by-step visual approach (over 250 screenshots). Updated 5th June 2017. Now also includes a comprehensive index. Read More >

WordPress To Go: How To Build A WordPress Website On Your Own Domain, From Scratch, Even If You Are A Complete BeginnerWordPress To Go: How To Build A WordPress Website On Your Own Domain, From Scratch, Even If You Are A Complete BeginnerNOW UPDATED FOR 2017!

If you are a small business owner or a hopeful Internet entrepreneur, then you know you need a professional website.

T... Read More >

WordPress All-in-One For Dummies (For Dummies (Computer/Tech))WordPress All-in-One For Dummies (For Dummies (Computer/Tech))Everything you need to know about WordPress

If you strive to have a blog that suits your needs, delights your readers, and keeps visitors coming ba... Read More >

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

    Just what I was looking for.