Skip to content

Instantly share code, notes, and snippets.

@coreyweb
Created March 5, 2012 14:21
Show Gist options
  • Save coreyweb/1978504 to your computer and use it in GitHub Desktop.
Save coreyweb/1978504 to your computer and use it in GitHub Desktop.
Display Custom Data in WordPress Layouts
<?php // Code awesomeness by Aaron Collegeman : https://github.com/collegeman ?>
<?php if ($foo = get_post_meta($post->ID, 'foo', true)) { ?>
<?php echo "<strong>{$foo}</strong>" ?>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment