你可以试试这个WP_User_Query
而是:
$args = array (
\'meta_query\' => array(
array(
\'key\' => \'newsletter\',
\'value\' => \'true\',
),
array(
\'key\' => \'account\',
\'value\' => \'false\',
),
),
\'date_query\' => array(
array(
\'after\' => \'2015-01-13 00:00:00\',
\'inclusive\' => true,
),
),
);
$user_query = new WP_User_Query( $args );
其中,我假设您的用户元值是布尔字符串,即。
\'true\'
和
\'false\'
.