Hi,
I'm using post type metabox with 'clone' and 'sort' option.
I haven't selected any posts, but rgm_meta has zeros in the array.
Get filed Value:
$posts_related = rwmb_meta( 'post_related', array(), $id );
var_dump($posts_related);
array(1) {
[0]=>
int(0)
}
I want the array to be empty if nothing is selected.
Field settings:
array (
'id' => 'post_related',
'type' => 'post',
'name' => 'title',
'post_type' => array(
0 => 'post-type-1',
1 => 'post-type-2',
2 => 'post-type-3',
),
'field_type' => 'select_advanced',
'clone' => 1,
'sort_clone' => 1,
),
*I can select multiple in Select Advanced, but I can't change the order, so I use a 'clone'.
Regards,