WordPress – Auto Convert Youtube Video URL to Embed Code

Posted in Wordpress Development on 13 March 2012 0 comment

For those who are familiar with WordPress, you might wonder why I blog about this topic since WordPress already added this feature since version 2.9. Although this is not a theme-specific issue, there are still some users who emailed me asking why their youtube video URL are not being converted to embed code automatically.

What you should do: Always put your video URL in a new line

The example below works, and a video player be displayed when you view the post.

Your content here. Your content here. Your content here.
http://www.youtube.com/watch?v=nTDNLUzjkpg
Your content here. Your content here.

Preview of the code above:

Your content here. Your content here. Your content here.

Your content here. Your content here.

Try putting the link in the same line with other text, it will NOT work:

Your content here. Your content here. Your content here.
Guys, check out this video http://www.youtube.com/watch?v=nTDNLUzjkpg
Your content here. Your content here. Your content here.

Hope this helps.

 

Posted by Zen on 13 March 2012 • 14,265 visits 0 comment
Tags :


or Subscribe to specific category only :




  - 0 Comments


No comment yet. Be the first to leave a comment!

Leave a Reply

You must be logged in to post a comment.

Previous Post
«
Next Post
»