How to Set Default Login Redirect to Current User Location?
This topic contains 30 replies, has 5 voices, and was last updated by Backpacking Series 7 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 26, 2018 at 3:47 pm #1416
Hello,
I looked the discussion on login redirect on a previous discussion on this forum and understand that there might be a solution already.
I have a similar scenario wherein a user needs to return to her / his current location, which I beleive is the default WordPress behavior. However, right now, the user is redirected to home page. A sample URL I need help with is:
https://www.backpackingseries.com/backpacking-north-east-india-the-book/book-review-guidelines/
Can someone please help?
Theme: Gazette (by Automattic)
WordPress Version: 4.9.2Kind regards
January 26, 2018 at 4:51 pm #1417Hello,
Thanks for writing in today.
Are you referring to the “Login” link/url on page you linked above?
To bring the user back to the page after registration you will need to add a login/register form to the page with a shortcode; the popup doesn’t ‘know’ the URL of the page where it is being opened, so new user would be sent to the home page after registration. The form has to be ‘inside’ the page to know the page.
Let us know how it goes
January 26, 2018 at 6:57 pm #1418Thank you Alex.
I am editing this response after trying your recommendation. I now have an inline login form. However, it still redirects the user to homepage. Please advise.
Kind regards,
January 26, 2018 at 7:08 pm #1419Update,
The inline login works when using the form – it redirects users to the same page after login. However it sends the user to homepage when using the social login option.
Please help!
January 27, 2018 at 1:34 am #1420Can you check your UsersWP settings please?
If that is not the issue, post URL and WP admin details and we will have a look.
ThanksJanuary 27, 2018 at 10:16 am #1422Thank you for the response.
Yes, the settings look okay. Please see attachment.
However, while trying to add an user (to provide you admin access) through the admin screen, I get the following error:
Warning: in_array() expects parameter 2 to be array, null given in /plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache.php on line 201 Warning: Cannot modify header information - headers already sent by (output started at /plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache.php:201) in /wp-includes/pluggable.php on line 1216I am not sure what is this error related to – UsersWP or SEO plugin. I’ve raised a query with Yoast support.
Your guidance is welcome too!
Kind regards
January 27, 2018 at 10:28 am #1424If that is not the issue, post URL and WP admin details and we will have a look.
ThanksJanuary 27, 2018 at 10:39 am #1425Got it. Thank you
Will do so as soon as I am able to resolve this issue to add a new user.
Kind regards,
January 27, 2018 at 11:51 am #1426This reply has been marked as private.January 27, 2018 at 12:00 pm #1427That page does not request a login?
Redirect to the previous page will only work if they visit a page that requires a login.
Can you give an example of such a page?
ThanksJanuary 27, 2018 at 12:13 pm #1428Yes, it does have a login form. Please scroll to the box. See attachment.
URL: https://www.backpackingseries.com/backpacking-north-east-india-the-book/book-review-guidelines/
Kind regards
January 27, 2018 at 12:25 pm #1430The problem scenario occurs with social login option only.
January 27, 2018 at 12:25 pm #1431But you can see the page without being logged in, so if you choose to go to the login page, instead of being forced to login, redirects do not work.
Do you have an example of a page that requires a login, meaning a page you cannot see unless you are logged in?January 27, 2018 at 12:27 pm #1432Actually, the same box has protected content. Once you login, the protected content is visible to the user. (While a guest only sees the login form.)
January 27, 2018 at 12:28 pm #1433But it still does not force you to login. So I guess you do not have an example of a page that requires a login, meaning a page you cannot see unless you are logged in?
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket