I have a problem with wp_redirect
which does seem to redirect. It's a full url that is on the current website. I need to put exit();
after wp_redirect
for it to redirect. Is this normal? Redirect is in an init
action btw.
-
3Read first line under "Usage" codex.wordpress.org/Function_Reference/wp_redirect – czerspalace Apr 18 '14 at 18:23
The only thing wp_redirect()
is adding HTTP header to the current request. It doesn't prevent request from proceeding to further loading page and must be followed by exit statement to work correctly.