[Resolved] wp_login_url redirection from a 404 page
Hi there, I currently have this code which turns into a link.
<a href="<?php echo wp_login_url( get_permalink() ); ?>">Administrator Login</a>
When this link is clicked, the user gets redirected to the standard login page, once credentials are done the user is redirected BACK to the original page they came from. This is quite excellent!
Now when I send someone a link to a draft and they are not logged in, they are greeted with a 404 page. Perfectly understandable.
However, If they use that same link I was talking about earlier to login, the redirection gets lost somehow and the user is taken to the Dashboard instead of the draft post.
Is there anyway that a 404 page can keep the referrer when using wp_login_url?
- The topic ‘[Resolved] wp_login_url redirection from a 404 page’ is closed to new replies.