Hello!
I’m following this guide: https://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/
I’ve three custom fields I want to filter by and they are SELECT
I’ve made the appropriate changes to the code, but I still have a problem:
Filters only load the options if they are already defined in the query. Following this link you’ll get “Format” and “Region” filters, but not the third one (“country”)
https://tournamentscanner.org/archives/tournament?format=standard®ion=madrid
Currently my code is as follows, as you can see, if the parameter is not in the query get_field_object fails to return an array.
// get the field's settings without attempting to load a value
$field = get_field_object($key, false, false);
echo "haciendo get_field_object a key: " . $key . " /Name: " . $name . " /Field: ". $field . "<br/>";
Any idea on why this function is failing? Thanks