-
Author
Tagged: Facebook login redirect
-
November 5, 2016 at 02:20 #142952jsd11Participant
Hi there,
When users log in via Facebook, they are redirected to their profile activity page. I have run through some old topics on here and tried some of the suggestions but still can’t seem to get the facebook user’s login to redirect to the homepage or the previously viewed page. Any advice?
Thanks. 🙂
November 7, 2016 at 06:04 #143060jsd11ParticipantI modified the facebook kleo file and will keep a copy of it. It works great now. 🙂
January 25, 2017 at 11:43 #150729felixcorpParticipantHi, How did you fix this?
Does it redirect back to the previously viewed page now?
Can you share this fix?
Hoping you have time to respond.
Thanks.
January 25, 2017 at 13:37 #150739jsd11ParticipantHi there,
Go here: yourthemename-or-child/kleo-framework/lib/function-facebook-login.php
and go down to around line 101
You can change where it redirects there, like this:
if( user.type === ‘login’ ) {
if(window.location.href.indexOf(“wp-login.php”) > -1) {
window.location = “http://www.yoursite.com/welcome/”;
} else if (user.redirectType == ‘reload’) {
window.location = “http://www.yoursite.com/welcome/”;
} else {
window.location = “http://www.yoursite.com/welcome-2/”;
}
}It’s always wise to do this in a child theme. Hope it helps.
January 25, 2017 at 14:05 #150741felixcorpParticipantHi,
There’s no ‘function-facebook-login.php’ in the particular directory you stated i.e themename>kleo-framework>lib>
Do I have to create the PHP file and place it in my child theme?
What do you suggest I do please?
Thanks.
January 25, 2017 at 14:19 #150742jsd11Participantwp-content/themes/kleo-child/kleo-framework/lib/
is there for me, I’m sorry I have nothing else to suggest if you don’t have that file.
January 25, 2017 at 15:03 #150746felixcorpParticipantThanks for your response.
However, I’m using a different theme (Buddyapp) which was made by the same author but apparently has the same issue.
Hopefully, there’s someone out there who has fixed the Facebook login redirect issue on Buddyapp theme and lets us into how they fixed it.
Regards
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.