Tag Info

New answers tagged


Found the answer (via) Instead of using the function I added an action to "wp_loaded", that makes sure that it gets loaded before any headers are sended. <?php add_action ('wp_loaded', 'growtheme_mailchimp_signup'); function growtheme_mailchimp_signup() { // Submit the Form wp_redirect($redirect); exit; ?>


You have to use wp_redirect() before get_header() Then it will not show header error.


add_action('template_redirect', function(){ if(isset($_POST['subscriptio'])){// make this condition such that it only matches when a registraiotn form get submitted /** * do your stuff here */ wp_redirect();//.... } });

Top 50 recent answers are included