this is a great workaround.
So i’d first do the WP_Query without limiting the results by comparing the user input and after the query i’d loop the results once more to filter the results via php.
I need the field’s label for the WP_Query, not after the query.
If i had two values to compare like:
'meta_query' => array( array( 'key' => 'kk-cups-min', 'value' => $userInput, 'compare' => '<=', 'type' => 'NUMERIC' ), array( 'key' => 'kk-cups-max', 'value' => $userInput, 'compare' => '>=', 'type' => 'NUMERIC' ) ... ),
i’d have do loop twice to filter the results via php.
I think this is a great solution so far.
(it would be much more easier if one could do it all in the WP_Query, but this workaround is just fine for me now)
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've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.