Last active
August 29, 2015 14:03
-
-
Save yratof/4f312ae162f49876959c to your computer and use it in GitHub Desktop.
Barley Custom Field
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
function barley_field($field_name){ | |
$key_values = get_post_custom_values( $field_name ); | |
foreach ( $key_values as $key => $value ) { | |
if ( function_exists( 'barley_wrapper' )) { | |
echo barley_wrapper('wp_custom_field', $value , $field_name); | |
} else { | |
echo $value; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment