// Register oEmbed providers function youtube_oembed_provider() { wp_oembed_add_provider( '#https?://(www.)?youtube.com/watch.*#i', 'http://www.youtube.com/oembed/', true ); wp_oembed_add_provider( '#https?://(www.)?youtube.com/playlist.*#i', 'http://www.youtube.com/oembed/', true ); wp_oembed_add_provider( '#https?://(www.)?youtu.be/.*#i', 'http://www.youtube.com/oembed/', true ); } add_action( 'init', 'youtube_oembed_provider' );