action is not called after a php request
I just solved it! The problem was, that the php request handling works different in wordpress. There has to be a workaround with a admin_post.php hook: Instead of if( isset($_POST[’email’]) && isset($_POST[‘title’]) ){…} I had to use this hook: add_action( ‘admin_post_nopriv_process_form’, ‘process_form_data’ ); add_action( ‘admin_post_process_form’, ‘process_form_data’ ); function process_form_data() { my_function($_POST[’email’],$_POST[‘title’]); wp_redirect($_POST[‘url’]); } A hidden … Read more