Where to add wp_redirect on frontend pages?
I found that currently this is the only reliable solution: if (is_admin()){ header(‘Location: ‘. get_permalink()); exit(); } else add_action(‘template_redirect’, function (){ wp_redirect(get_permalink()); exit(); }); In the case of backend pages the template_redirect does not seem to be supported. If I use wp_redirect the redirection does not happen (maybe it is a bug) or the function … Read more