Posted By

silentpro on 08/19/11


Tagged

php textmate wordpress video embed functions wp YouTube


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Kurt


Wordpress - YouTube Custom Post Meta


 / Published in: Other
 

  1. /* CUSTOM POST FOR YOUTUBE VIDEO */
  2. <?php if(get_post_meta($post->ID, 'youtubeVideoID', true)): ?>
  3.  
  4. <iframe width="480" height="390" src="http://www.youtube.com/embed/<?php echo get_post_meta($post->ID, 'youtubeVideoID', true); ?>?rel=0" frameborder="0" allowfullscreen></iframe>
  5.  
  6. <?php endif; ?>

Report this snippet  

You need to login to post a comment.