Created
October 15, 2013 21:03
-
-
Save lucasdinonolte/6998637 to your computer and use it in GitHub Desktop.
WordPress, loop over custom meta data of a post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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