Hello,
I want to select_advanced field, but only get the users that meet a condition with respect to a proper field saved in custom table users.
$meta_boxes[] = [
//'title' => '',
'id' => 'id_field_metabox',
'type' => 'user',
'storage_type' => 'custom_table', // Important
'table' => 'usuarios', // Your custom table name
'fields' => [
[
'id' => 'id_field_metabox_select',
'name' => '',
'type' => 'user',
'multiple' => true,
'field_type' => 'select_advanced',
'query_args' => array(
'meta_key' => 'custom_field_A',
'meta_value' => '0',
),
],
],
I try this:
'query_args' => array(
'meta_key' => 'custom_field_A',
'meta_value' => '0',
),
But not run: "No results found".
Where custom_field_A was created before:
[
'id' => 'custom_field_A',
'name' => 'Custom Field A',
'type' => 'text',
'std' => 0, // 0 or 1',
],
];
It's possible this?
Many thanks,
Sergio