-
Author
Tagged: redirect after login widget form
-
February 5, 2015 at 18:29 #44846nunoParticipant
Hello,
I try to reopen a previous ticket, but no success. Here is my problem.
I would like to redirect a particular page after login successful.
My question was solved for the modal popup login but not with the login widget in the right column.With the hack you provide (https://archived.seventhqueen.com/forums/topic/popup-login-not-working-at-homepage) I can redirect to a particular page after login successful with the pop up modal window. I would like to redirect to the same page when I login in the widget form login.
Thanks in advance,
FranciscoFebruary 5, 2015 at 19:02 #44854RaduModeratorHello Francisco,
Kleo can do this.
Just go to Theme Options -> Miscellaneous -> Login redirect for Popup -> Set -> Reload The Current Page
Tested and working on Kleo 2.3.1
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 16, 2015 at 04:53 #46204Reflect GrowthParticipantHey there,
I’m on Kleo 2.4 and this is not working for me either.
Reproduction Steps:
1) Use BuddyPress Login widget on sidebar
2) Enter username / passsword
3) User is redirected to wordpress dashboard.The Modal window from the Login link behaves as @Radu has outlined. But, the Buddypress login widget does not. Any thoughts, before I start trying to fix this with a plugin / extra code.
February 16, 2015 at 04:55 #46205Reflect GrowthParticipantIn fairness the Theme Option does specifically say this is for the Popup window only. Just seems a shame to have the BuddyPress widget behave complete differently – which will only confuse site users.
February 16, 2015 at 06:05 #46209Reflect GrowthParticipantOnly way I can seem to get this to work is to do two things:
1st Change: line 78 in /wp-content/plugins/buddypress/bp-core/bp-core-widgets.php to:
<form name=”bp-login-form” id=”bp-login-widget-form” class=”standard-form” action=”<?php echo esc_url( site_url( ‘wp-login.php’, ‘login_post’ ) ); ?>?redirect_to=<?=current_url();?>” method=”post”>
Where current_url() is a custom function to get the current URL.
2nd Change: In your themes function.php add in:
function login_redirect( $redirect_to, $request, $user ){
if(isset($_REQUEST[‘redirect_to’])){
return $_REQUEST[‘redirect_to’];
}
return home_url();
}
add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );Which will basically redirect to the value set in the “request_to” GET variable where this is set. Where it isn’t it will send the user to the home page of your instance.
Anyone got any less invasive ways of achieving this? I’d rather not be hacking the core of Buddypress.
February 19, 2015 at 13:57 #46684AndreiModeratorFor other places than the ones related to our theme, you will have to manage the way wordpress itself works.
You can manage all aspects of login/redirects using the following plugin:
https://wordpress.org/plugins/peters-login-redirect/Some of the cases won’t apply when you’re logged in as an admin, you’ll be probably taken to the backend dashboard page.
Let me know how it went.
CheersHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 2, 2015 at 16:28 #60767Salle32ParticipantHi,
I tried Peter´s plugin – but the problem is still there.
Customer land on the homepage – even if redirected.
Customer does not see themselfves as logged in – until they refresh the page.Best Regards
FredrikJune 2, 2015 at 16:39 #60768AndreiModeratorCan you please provide me a link to your website and a demo account to test the behavior you’re reporting ?
Looking forward.
CheersHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 3, 2015 at 03:23 #60852AndreiModeratorI just tested to log in from the home page of your site and the page was properly refreshed and I was logged in.
I have tested from safari browser.Please try to clear your browser cache and try again yourself.
CheersHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 3, 2015 at 06:37 #60854Salle32ParticipantHi,
I guess that you than landed on the homepage?
Your supposed to be redirected to http://ouryoga.se/skapa-ditt-event/
When you then get to http://ouryoga.se/skapa-ditt-event/ – you see the text that tells you to log in again.
It´s here you have to refresh the page again to be logged in.
Did you test this?So it´s supposed to be like this:
You come to: http://ouryoga.se/skapa-ditt-event/
You klick: Log In
You choose Facebook login
You land on http://ouryoga.se/skapa-ditt-event/ and you see the form to fill in.This has happened maybe 1 out of 10 times for me.
You please check again?
Best Regard
FredrikJune 3, 2015 at 07:11 #60856Salle32ParticipantIn additon to above message:
ONE THING I KNOW THAT WORKS BUT I NEED YOUR HELP WITH:
In the event form for Eventon Action User – the user get redirected to wp-login.
http://ouryoga.se/skapa-ditt-event/If I skip the standard wp-login and go to the kleo_modal-login – everything works out fine. But I do not know how to get the modal-login instead of the wp-login.
Any advice?
I also found this out: THE FIRST TIME i log in with Facebook – it works ok. It´s just the redirect that doesn´t follow. THE SECOND TIME I log in with Facebook – then the problem occurs.
So when I have an account and log in again – THEN I must refresh the page to see that I´m logged in and also be able to see the Event Form on the page http://ouryoga.se/skapa-ditt-event/.
Tricky for me – maybe easy for you?
I´d appreciate all help – because customer send e-mails to me and wonder how it works/or not 🙂
Thanks
FredrikJune 3, 2015 at 11:53 #60876AndreiModeratorYou’ll probably better wait for the theme update as I firstly suggested.
It will come with better support for redirect and you will be able to set your log in redirect directly from the theme options panel.Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.