Timeline for wp_redirect not working after submitting form
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 24, 2013 at 15:38 | comment | added | henrywright | @Milo you nailed this for me. "headers already sent" was the problem for me. Thanks | |
Jan 12, 2013 at 4:01 | vote | accept | Anagio | ||
Dec 23, 2012 at 17:54 | comment | added | Milo |
you wouldn't have to use do_shortcode , my point was that you could add it via a shortcode to a post/page's content, then all your processing and rendering code is separated from the template, that way the form could work on any page you place the form's shortcode within the content of. the action can just target the current page with a # , or be blank, since you're hooking all requests to check if your form was submitted, it will work from/to any page.
|
|
Dec 23, 2012 at 7:36 | comment | added | Anagio | Thanks, so your suggesting I put the form into a short code then use do_shortcode() within the template to display the form. The hook would go into my functions.php. What does the action of the form become to fire the function/hook? | |
Dec 22, 2012 at 19:53 | comment | added | Milo | @Anagio - added an example | |
Dec 22, 2012 at 19:53 | history | edited | Milo | CC BY-SA 3.0 |
added 571 characters in body
|
Dec 22, 2012 at 17:55 | comment | added | Anagio | @Miloe yes I just saw the headers already sent message now with debugging enabled and the better http redirect plugin on. I'm not familiar with how to use the hooks, can you point me to some tutorial or show some example code please | |
Dec 22, 2012 at 17:53 | history | answered | Milo | CC BY-SA 3.0 |