- This topic has 4 replies, 2 voices, and was last updated 1 year, 10 months ago by .
-
Topic
-
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
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.