WordPress API functions not working at AJAX functions.php call
Your problem is probably because you do not return a json object but an html (actually mixed text and html), and you set jQuery to validate that the response is json, which it isn’t. your code at the ajax handler should be something like $catshtml = wp_dropdown_categories(…..echo=0); $ret = array(‘data’ => $catshtml); wp_send_json($ret); die(); on … Read more