Support

Account

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;
    }