I have a taxonomy field (single value – select) within a repeater and am finding searching for terms can be really slow at times. There’s around 150 terms within this taxonomy and sometimes searching is fairly quick while other times it takes ~5-10 seconds to load.
Is there a way to optimize the taxonomy field when there’s a large amount of terms?
Bueller?
Still haven’t found a solution on this myself.
Hi @wleefro
What I have in mind is you can limit the returned terms so it will load faster. You can do it like this:
function my_taxonomy_query( $args, $field, $post_id ) {
// modify args
$args['number'] = 10;
// return
return $args;
}
add_filter('acf/fields/taxonomy/query', 'my_taxonomy_query', 10, 3);
If you want to find specific terms, just search it on the field input.
I hope this helps.