Skip to content

Instantly share code, notes, and snippets.

@lucasdinonolte
Created October 15, 2013 21:03
Show Gist options
  • Save lucasdinonolte/6998637 to your computer and use it in GitHub Desktop.
Save lucasdinonolte/6998637 to your computer and use it in GitHub Desktop.
WordPress, loop over custom meta data of a post
<?php $customKeys = get_post_custom();
foreach($customKeys as $key => $value) {
if(substr($key, 0, 1) !== '_') {
?>
<h3><?php echo $key; ?></h3>
<p><?php echo $value[0]; ?></p>
<?php
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment