@jhned wow this is awesome! Thank you!
Would this also pull in layouts that contain repeater fields and all it’s data?
Hi,
I had the same problem. It was because I changed the value of my radio button after I already saved posts / pages with the old value and the choices no longer matched what was in the database.
I solved it by simply making another choice and updating the post / page. Hope that works for you.
According to this site for $args to use https://www.billerickson.net/code/wp_query-arguments/
'meta_query' => array( //(array) - Custom field parameters (available with Version 3.1).
array(
'key' => 'color', //(string) - Custom field key.
'value' => 'blue', //(string/array) - Custom field value (Note: Array support is limited to a compare value of 'IN', 'NOT IN', 'BETWEEN', or 'NOT BETWEEN')
'type' => 'CHAR', //(string) - Custom field type. Possible values are 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'. Default value is 'CHAR'.
'compare' => '=', //(string) - Operator to test. Possible values are '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default value is '='.
),
array(
'key' => 'price',
'value' => array( 1,200 ),
'compare' => 'NOT LIKE'
)
So following the above example I would maybe try something like this and add as many keys as you need to in order to search all the taxonomies you want.
$args['meta_query'] = array(
array(
'key' => my_key_1,
'value' => $args['s'],
'compare' => 'LIKE',
),
array(
'key' => my_key_2,
'value' => $args['s'],
'compare' => 'LIKE',
),
array(
'key' => my_key_3,
'value' => $args['s'],
'compare' => 'LIKE',
)
);
return $args;
Any update on this? Looking to do the same.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.