
Hi,
I am using a paid plugin for wordpress to make frontend forms for my users.
So I am using ACF (not pro) and “Frontend Submit Pro” together.
I have more than 200 categories in my site.
So I need to make multiple forms and in each forms in need some categories to be selected from users as checkbox or radio.
For now I use this filter to exclude some categories from selection
add_filter('acf/fields/taxonomy/query/name=kathgories', 'exclude_categories', 10, 2);
function exclude_categories( $args, $field ) {
global $uncategorized_id;
$args['exclude'] = array(290,287,283,289,281,291,286,280,284,279); //the IDs of the excluded terms
return $args;
}
It is working but I need some modifications to that filter.
1. Because categories is more than 200+ I need a filter that excludes all categories from showing and later i want to include the 5,10 categories that I want to show. (The opposite of this filter above.)
2. I need to make multiply forms with different categories so I need a way to assign each filter to each form and not for all.