You need two additional functions.
The first to make the column sortable hooks into the manage_edit-{post_type}_sortable_columns
filter…
function ws_sortable_manufacturer_column( $columns ) {
$columns['manufacturer'] = 'Manufacturer';
return $columns;
}
add_filter( 'manage_edit-post_sortable_columns', 'ws_sortable_manufacturer_column' );
and the second hooks into pre_get_posts
to manipulate the query to sort by the column…
function ws_orderby_custom_column( $query ) {
global $pagenow;
if ( ! is_admin() || 'edit.php' != $pagenow || ! $query->is_main_query() || 'post' != $query->get( 'post_type' ) ) {
return;
}
$orderby = $query->get( 'orderby' );
switch ( $orderby ) {
case 'manufacturer':
$query->set( 'meta_key', 'wccaf_manufacturer' );
$query->set( 'orderby', 'meta_value' );
break;
default:
break;
}
}
add_action( 'pre_get_posts', 'ws_orderby_custom_column' );
Hope that helps