WordPress.org

Support

Support » How-To and Troubleshooting » Plugin avail to convert WP.com's YouTube shortcode?

Plugin avail to convert WP.com's YouTube shortcode?

  • I just exported posts/media from a WordPress.com 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 WordPress.com’s media shortcode (i.e. [youtube=http://www.youtube.com/watch?v=ovSQvI02rec] ) 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 WordPress.com 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 WP.com's YouTube shortcode?’ is closed to new replies.
Skip to toolbar