I have this function to convert any YouTube URL in any post or page to embed :- function embed_youtube_an($post_content) { global $posts; //preg_match(‘|http://www.youtube.com/watch?v=([a-zA-Z0-9]+)|’, $posts->post_content, $matches); preg_match(‘#http://w?w?w?.?youtube.com/watch\?v=([A-Za-z0-9\-_]+)#s’, $posts->post_content, $matches); if (!empty($matches[1])) { $post_content=”<object width=”415″ height=”250″>”; $post_content .= ‘<param name=”movie” value=”http://www.youtube.com/v/’ . $matches[1] . ‘&hl=en_US&fs=1&”></param>’; $post_content .= ‘<param name=”allowFullScreen” value=”true”></param>’; $post_content .= ‘<param name=”allowscriptaccess” value=”always”></param>’; $post_content .= … Read more