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:

Step-By-Step WordPress for Beginners: How to Build a Beautiful Website on Your Own Domain from Scratch (Video Course Included)Step-By-Step WordPress for Beginners: How to Build a Beautiful Website on Your Own Domain from Scratch (Video Course Included)

Note: This book comes with 29 WordPress training videos and support.

Updated for 2017! Learn WordPress and build a professional website you're p... Read More >
WordPress: The Missing Manual (Missing Manuals)WordPress: The Missing Manual (Missing Manuals)

Whether you’re a budding blogger or seasoned Web designer, WordPress is a brilliant tool for creating websites, once you know how to tap its impr... Read More >

WordPress for Beginners 2018: Subtitle What's this? A Visual Step-by-Step Guide to Mastering WordPressWordPress for Beginners 2018: Subtitle What's this? A Visual Step-by-Step Guide to Mastering WordPress

Master WordPress using our step-by-step visual approach (over 250 screenshots).

Building a beautiful, professional looking WordPress website... Read More >

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

    Just what I was looking for.