If you create an admin column for a metabox custom field, the value cannot be updated.
I have created a Customer Post Type called nomination
, with a custom field called nomination_year
.
The following code creates an admin column for nomination_year
:
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
$meta_boxes[] = array(
'title' => 'Nomination Admin Columns',
'post_types' => 'nomination',
'fields' => array(
array(
'name' => 'Award Year',
'id' => 'nomination_year',
'type' => 'number',
'admin_columns' => array(
'position' => 'after title',
'sort' => true,
'searchable' => true
),
),
),
);
return $meta_boxes;
} );
However, if I try to updates any Nomination's year value, it does not change when I click UPDATE in the admin dashboard.