-
Author
-
November 27, 2013 at 13:15 #7360iulianolaruParticipant
Dear users,
I am seeking help regarding an issue that i cannot figure out. I have inserted in functions.php from the child theme, the code to redirect users after login to the profile page which is working.However, if you login with facebook, the redirection does not occur.
What is there to do in order to have redirection for facebook logged in users as wel?
Thank you in advance.
With respect,
Iulian OlaruNovember 27, 2013 at 20:22 #7395SQadminKeymasterHi, Logging in with Facebook just refreshes the page. You need to edit a theme file and specify you redirect url.
File is: wp-content/themes/sweetdate/framework/functions/facebook_login.php
Search for:
window.location.reload();
replace with:
window.location = ‘http://mysite.com/redirect_url’;Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 28, 2013 at 16:20 #7424iulianolaruParticipantDear sqadmin,
Thank you for the solution which is supposed to work. However, i do not manage to get the right link to redirect the user, assuming of course that each profile has a different link.I have tried for example http://mysite.com/%username%/ http://mysite.com/$profile/ but with no result.
Of course i replaced mysite.com with the proper domain name.
What is there to do?
November 28, 2013 at 21:52 #7432AnchoraParticipanti don’t use the fb-login, but maybe the
buddypress-login-redirect plugin
works for you too.November 29, 2013 at 12:54 #7456iulianolaruParticipantThank you Anchora. I will be trying the plugin later today but i would also like to know how buddypress works in this situation. Would less load using sqadmin’s instructions than installing another plugin.
November 30, 2013 at 12:30 #7482SQadminKeymasterHi, If you want to redirect to their profile then you need to add the following line
File is: wp-content/themes/sweetdate/framework/functions/facebook_login.phpCOPY CODE$redirect = bp_core_get_user_domain( $user_ID ).'profile/';
after
COPY CODE$logintype = 'login';
You will find two occurrences.
Then Search for:
window.location.reload();
replace with:
window.location = user.url;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 ‘Sweetdate – WordPress’ is closed to new topics and replies.