-
Author
Tagged: login, login redirect, redirect
-
June 7, 2015 at 03:40 #61368valuserParticipant
Up to date versions of everything wp,bp (2.3.1) & kleo.
Apparently coming in Kleo version 3 is the ability to specify the login redirect.
However my query relates to a redirect that depends on who logs in.
In another theme I had a function to do this. (see http://pastebin.com/pLxRFBpF)
it does not work with kleo.
Currently how can I override the current set-up ?
I have tried setting Theme Options –> Misc —> ‘Login redirect for Popup’ to blank (Select an Item) and using the function given by http://sharmstr.com/login-redirect/
with $redirecturl = apply_filters( ‘kleo_modal_login_redirect’, ‘/’ . BP_MEMBERS_SLUG . ‘/’ . $_POST[‘log’], ”, $user_signon );
in line 37 but the current page just turns up.
Any ideas very welcome please.
June 7, 2015 at 05:21 #61374sharmstrModeratorGive it a try in Kleo 3.0 when it comes out. The login functionality that Kleo overrides has been made a bit more friendly. It will probably work then. If not, let us know. I just dont see a point in changing a bunch of code on your site when Kleo 3 is right around the corner.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 7, 2015 at 05:22 #61375sharmstrModeratorI should mention, the new redirect isnt just a box that allows you to specify a location. The actual logic has been altered quite a bit.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 7, 2015 at 12:12 #61390valuserParticipantBril. Thanks for your reply.
Any news on the estimated arrival date of v.3.0 ??
June 7, 2015 at 17:12 #61400sharmstrModeratorSorry, I dont know.
As a test, I used the code here: https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect on the Kleo 3.0 site I have and it worked fine. Then I added it to my Kleo 2.4.3 site and it also worked fine. It obviously doesnt have all of your logic, but the main difference I see is how the redirect is called. You’re using wp_redirect() which I dont think you have to. Since you’re filtering the ‘login_redirect’ filter, the redirect will happen automatically. Change it to return $redirect_to and remove the exit. Also, make sure you have Default WP redirect set in Theme Options > Misc. Let me know if that works.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 7, 2015 at 21:30 #61449valuserParticipantResolved!
Can’t thank you enough for taking the time to have a look at the code.
Change it to $redirect_to and remove the exit.
Was all that was needed.
Just a copy and paster myself so huge huge thank you.
Great support over and above what could reasonably be expected!
June 7, 2015 at 22:09 #61465sharmstrModeratorAwesome *hive five*
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.