How to load WP categories into array for autocomplete?
It is not clear what autocomplete function you are using in JS, if it is from a library or custom, but I’m assuming that it expects an array where locations is passed and not a string, which is what you’re feeding it. The function you should be using is get_terms(), not wp_list_categories(), the former being … Read more