Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Created February 12, 2013 19:09
Show Gist options
  • Save kraftbj/4772423 to your computer and use it in GitHub Desktop.
Save kraftbj/4772423 to your computer and use it in GitHub Desktop.
Conditionally show meta data
<?php
$publication = get_post_meta($post->ID, 'publication', true);
if ($publication) { ?>
<div class="publication">Originally found in <?php echo $publication; ?></div>
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment