Support » Fixing WordPress » Plugin avail to convert's YouTube shortcode?

  • I just exported posts/media from a hosted site to an independently hosted install for a friend. I’m looking for a quick plugin that will convert years of old posts that used’s media shortcode (i.e. [youtube=] ) into actual embedded video. Right now the posts only show the actual shortcode text.

    Any fixes? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Is there no fix or plugin that converts the short code into working embeddable videos on a private install?

    Post this into your theme’s functions.php file:

    function youtubeSC($atts) {
    	return '<object width="425" height="344"><param name="movie" value="'.substr($atts[0],1).'?hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'.substr($atts[0],1).'?hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';
    add_shortcode("youtube", "youtubeSC");

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin avail to convert's YouTube shortcode?’ is closed to new replies.