Advertisement
Guest User

Field

a guest
Jun 19th, 2013
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. <?php
  2. $myfield= get_post_meta($post->ID, 'short', true);
  3. echo do_shortcode($myfield);
  4. //Checking if anything exists for the key short
  5. if ($short) { ?>
  6. <?php echo $short; ?>
  7. <?php } //if there is nothing for short then display
  8. else { ?>
  9. <?php the_post_thumbnail(); ?>
  10. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement