I’m making an attempt to question posts based mostly on the worth of a repeater subfield dropdown (choose area) however am having hassle.
Here’s what I’m working with:
<?php
// Arrange the arguments for the question
$args = array(
'meta_query' => array(
array(
'key' => 'groups_and_committees_selector_$_committees_groups', // identify of the ACF subfield
'worth' => 'Board of Administrators', // worth to filter by
'examine' => '=' // comparability operator
)
)
);
$user_query = new WP_User_Query($args); // Create the WP_User_Query object
$customers = $user_query->get_results();// Get the outcomes
foreach ( $customers as $person ) { // Loop by way of the customers
echo 'Consumer Identify: ' . $user->user_firstname . '<br>'; // Show the person's login identify
}
?>
This isn’t returning any outcomes. If I attempt the above code however use a normal area key of “take a look at” and worth of “true” it returns the 2 customers I setup for that take a look at accurately.
I’m guessing there is a matter with my key or my worth however I can’t determine it out.
What am I doing improper in my code?