Create Page With wp_insert_post() and AJAX
Ok, so after some fiddling, I’ve got things working. It turns out that I was setting the add_action hooks incorrectly for the AJAX part. The hooks need to be: add_action( ‘wp_ajax_nopriv_MYFUNCTION’, ‘MYFUNCTION’ ); and add_action( ‘wp_ajax_MYFUNCTION’, ‘MYFUNCTION’ ); …in my case and original code the function (‘MYFUNCTION’) in question was to create a post via … Read more