I created a custom field bookcode
using the code below. So, how I can add a column for this meta data into my post type manager and make it sortable?
function save_bookcode( $post_id ) {
if ( wp_is_post_revision( $post_id ) )
return;
// save custom field 'bookcode' as CFX+ID
add_post_meta( $post_id, 'bookcode', 'CFX' . $post_id, true );
}
add_action( 'save_post', 'save_bookcode' );