Hot answers tagged


Did I set up that wp_ajax_nopriv_ hook wrong? No, you did not. But that hook is for logged-out or unregistered users only. For logged-in users, the hook is wp_ajax_<action>. So you just need to change the add_action('get_events' in your code to add_action('wp_ajax_get_events', and the error 400 would be gone: add_action('wp_ajax_get_events', '...

Only top voted, non community-wiki answers of a minimum length are eligible