Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from billrobbins/image-or-video.php
Created October 16, 2013 07:11
Show Gist options
  • Select an option

  • Save jamiemitchell/7003815 to your computer and use it in GitHub Desktop.

Select an option

Save jamiemitchell/7003815 to your computer and use it in GitHub Desktop.
<?php if(get_post_meta($post->ID, "video_embed", $single = true) != ""){ ?>
<div class="video"><?php echo get_post_meta($post->ID, "video_embed", TRUE); ?></div>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail('primary', array('class' => 'shadow')); ?></a>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment