WordPress.org

Ready to get started?Download WordPress

Plugin Directory

YouTube metabox

Create YouTube meta-box for post with live preview

To get meta value in front-end, use get_post_meta() with meta key is youtube_id.

Example:

Print YouTube video ID:

<?php echo get_post_meta($post->ID, 'youtube_id', true);?>

Thumbnails:

<img src="http://img.youtube.com/vi/<?php echo get_post_meta($post->ID, 'youtube_id', true);?>/mqdefault.jpg" alt="" />

Video player:

<iframe src="http://www.youtube.com/embed/<?php echo get_post_meta($post->ID, 'youtube_id', true); ?>" width="588" height="331" frameborder="0" allowfullscreen></iframe>

Requires: 2.5 or higher
Compatible up to: 3.8.3
Last Updated: 2013-12-19
Downloads: 338

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,2,2