Skip to content

Instantly share code, notes, and snippets.

@yratof
Last active August 29, 2015 14:03
Show Gist options
  • Save yratof/4f312ae162f49876959c to your computer and use it in GitHub Desktop.
Save yratof/4f312ae162f49876959c to your computer and use it in GitHub Desktop.
Barley Custom Field
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