ACF filter not working in Frontend. Works in ACF though
-
Hi, I have defined this ACF filter. This works in ACF backend form, but doesn’t work in Frontend form
While defining the Frontend form, I have tried both including the full set of fields in ACF group, as well as just the individual field in ACF. The form returns all terms in the taxonomy ignoring the filter.
What could be the reason?
add_filter('acf/fields/taxonomy/wp_list_categories/name=item_type_taxonomy', 'custom_taxonomy_filter', 10, 2); add_filter('acf/fields/taxonomy/query/name=item_type_taxonomy', 'custom_taxonomy_filter', 10, 2); function custom_taxonomy_filter($args, $field) { // Limit the terms to specific term ids in the specified order $args['include'] = array(5168,5175); return $args; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘ACF filter not working in Frontend. Works in ACF though’ is closed to new replies.