Hello,
is it possible to remove the “Load more results” in a Select Menu and force this one to load all result at once ?
Best Regards
What kind of field are you talking about? Post object? Relationship? something else?
Each of the relationship type fields have a hook that lets you alter the query. For example this is the one for a relationship field acf/fields/relationship/query. You can alter the posts_per_page argument.
Hello
it’s a “Taxonomy” field or a “Taxonomy Terms” field.
https://www.advancedcustomfields.com/resources/acf-fields-taxonomy-query/
I don’t know if it’s possible with a taxonomy field. You can try setting
$args['number'] = 0;
I just try this code in my functions.php to see if it have any effects on taxonomy field without any result ? That very strange. Or I do not do it correctly.
add_filter('acf/fields/taxonomy/query', 'my_acf_fields_taxonomy_query', 10, 3);
function my_acf_fields_taxonomy_query( $args, $field, $post_id ) {
// Show 40 terms per AJAX call.
$args['number'] = 40;
// Order by most used.
$args['orderby'] = 'count';
$args['order'] = 'DESC';
return $args;
}
As I said, I didn’t know if it would work or not. I looked at the ACF code and could not really tell. I don’t see anything wrong with your code so I’d say the conclusion is that it won’t work.