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 Web Design For Dummies (For Dummies (Computer/Tech))WordPress Web Design For Dummies (For Dummies (Computer/Tech))Learn how WordPress can help you create a unique, customized Web site

Once only a platform for bloggers, WordPress is gaining popularity as a tool f... Read More >

Using WordPressUsing WordPress

This is the eBook version of the printed book.

WordPress has grown into the #1 blogging tool in its category: several million bloggers have down... Read More >
WordPress For Dummies (For Dummies (Computer/Tech))WordPress For Dummies (For Dummies (Computer/Tech))The bestselling guide to WordPress, fully updated to help you get your blog going!

Millions of bloggers rely on WordPress, the popular, free bloggin... Read More >

Related Posts Plugin for WordPress, Blogger...

Popularity: 6% [?]

  • http://smilepls.com/ Ramnath

    Just what I was looking for.

Stop SOPA!

SOPA breaks our internet freedom!
Any site can be shut down whether or not we've done anything wrong.

Stop SOPA!