I currently have a number of custom metaboxes each look very similar to this:
/* -----------------------------------------------------------
# Team Information
----------------------------------------------------------- */
add_action( 'add_meta_boxes', 'team_information_metabox' );
function team_information_metabox()
{
add_meta_box('team_information', 'Team Information', 'team_information_output', 'page', 'normal', 'high');
}
function team_information_output( $post )
{
//so, dont ned to use esc_attr in front of get_post_meta
$team_information_value= get_post_meta($_GET['post'], 'team_information' , true ) ;
wp_editor( $team_information_value, 'team-information', $settings = array('textarea_name'=>'team-information') );
}
function save_team_information( $post_id )
{
if (!empty($_POST['team-information']))
{
$data=$_POST['team-information'];
update_post_meta($post_id, 'team_information', $data );
}
}
add_action( 'save_post', 'save_team_information' );
And I am displaying them on a page like this:
$team_information_value = get_post_meta( get_the_ID(), 'team_information', true );
// Checks and displays the retrieved value
if( !empty( $team_information_value ) ) {
echo $team_information_value;
} else {
echo 'Value Not Fount or Empty';
}
For some reason, shortcodes are not working when I do this, how can I get shortcode functionality out of these?