Skip to content

Instantly share code, notes, and snippets.

@cklosowski
Created February 11, 2013 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cklosowski/4754835 to your computer and use it in GitHub Desktop.
Save cklosowski/4754835 to your computer and use it in GitHub Desktop.
Postmeta all the things!
<?php $meta_keys = get_post_meta( get_the_ID() ); ?>
<?php foreach( $meta_keys as $meta => $value ) : ?>
<?php if( ( '_' != $meta[0] ) && ( 'enclosure' != $meta ) ) : ?>
<span class="custom-meta"><strong><?php echo $meta; ?>:</strong> <?php echo $value[0]; ?></span>
<?php endif; ?>
<?php endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment