I tried to set one of the group's subfields to be displayed with admin columns, but it didn't work. The field should be out of the group to make it work.
function create_my_fields( $meta_boxes ) {
$meta_boxes[] = [
'title' => '...',
'id' => '...',
'post_types' => '...',
'context' => '...',
'fields' => [
[
'id' => '...',
'type' => 'group',
'group_title' => '...',
'fields' => [
[
'id' => '...',
'type' => 'checkbox',
// This will NOT work
'admin_columns' => [
'position' => 'after date',
'title' => 'Active',
],
],
],
],
[
'id' => '...',
'type' => 'checkbox',
// This will work
'admin_columns' => [
'position' => 'after date',
'title' => 'Active',
],
],
],
];
return $meta_boxes;
}
add_filter( 'rwmb_meta_boxes', 'create_my_fields' );
How to use the admin columns with the group subfields?