Created
July 1, 2016 23:38
-
-
Save niconerd-zz/35c2f1cf72acee927cabf7d647150ea2 to your computer and use it in GitHub Desktop.
Show additional fields meta key
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
/* Show additional fields meta key */ | |
function tribe_show_key_fields ( ) { | |
$fields = tribe_get_custom_fields(); | |
$fields = get_post_meta( get_the_ID() ); | |
foreach ( $fields as $name => $value ) { | |
if ( strrpos ( $name ,'_ecp_custom_' ) !== false ) { | |
echo 'Field: ' . $name . ' = ' . $value[0] . ' <br/>'; | |
} | |
} | |
} | |
add_action ( 'tribe_events_single_event_before_the_meta', 'tribe_show_key_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment