Avoid redirection by URL parameter
-
Hi,
?is it possible to avoid redirection using an URL parameterer?For example URL?noredirect=true …
I have modified this piece of code to make it work, but i have no idea if this can be done otherwise:
/* ------------------------------------------------------------------------ * * Redirect * ------------------------------------------------------------------------ */ add_action( 'template_redirect', function () { // redirect only NOT logged in users // Added noredirect URL parameter if ( is_user_logged_in() || isset($_GET['noredirect'])) { return; }
Regards,
Xavi
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Avoid redirection by URL parameter’ is closed to new replies.