Home › Forums › Backend Issues (wp-admin) › Error Ajax list taxonomy › Reply To: Error Ajax list taxonomy
The issue is that you have added a filter specifying 2 arguments to be passed but your function requires 3 arguments.
// 4th parameter is number of args to pass = 2
add_filter('acf/fields/taxonomy/query/key=field_62d02ad58c59f', 'my_acf_fields_taxonomy_query', 10, 2);
// function requires 3 args
function my_acf_fields_taxonomy_query( $args, $field, $post_id ) {
// Order by most used.
$args['parent'] = 0;
return $args;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.