Support » Themes and Templates » Youtube URL in custom field

  • I have a database of entries, each is a post. There is data in each post in a custom field, one of which is “video” which has the youtube url in it.

    Im trying to get the url to echo in my loop,

    <?php  if((get_post_meta($post->ID, "video", true))) { ?>
    <p><span class="youtube"><iframe title="YouTube video player" class="youtube-player" type="text/html" width="425" height="344" src="<?php echo get_post_meta($post->ID, "video", true); ?>	?wmode=transparent&fs=1&hl=en&modestbranding=1&iv_load_policy=3&showsearch=0&rel=1&theme=dark" frameborder="0" allowfullscreen></iframe></span></p>
    <?php } ?>

    the $video is not outputting anything. What am I doing wrong?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Youtube URL in custom field’ is closed to new replies.