manage posts custom column is not populating data from meta boxes

The 10 is the priority, 2 means that two variables are passed on to the function ( $column, $post_id ). I think the problem is trying to echo get_post_meta directly.
Try this:

function custom_employee_column( $column, $post_id ) {
    switch ( $column ) {
        case 'location' :
            $metaData = get_post_meta( $post_id , 'location' , true ); 
            echo $metaData;
            break;
        case 'age' :
            $metaData = get_post_meta( $post_id , 'age' , true );
            echo $metaData;
            break;
    }
}

Leave a Comment