|Posted: Sunday Mar 25th, 2012 at 4:40 pm #9060|
I would like to redirect my users to change password page on first time login using wordpress generated credentials.
My redirect function code looks like this
But its not working since the login_redirect hook already used by s2member. Can anyone tell me how to remove existing s2member login redirect?
List Of Topic Replies
|Posted: Tuesday Mar 27th, 2012 at 10:20 am #9228|
Hi there. Thanks for your inquiry.
First, let me start by saying that s2Member Pro makes this much easier to accomplish, because it integrates One-Time-Offers upon login, where something like this could be easily configured from the Dashboard.
However, to answer your question. This is how you would accomplish this via Hooks/Filters.
Create this directory and file:
|Posted: Tuesday Mar 27th, 2012 at 11:24 am #9234|
But i still don’t understand. this is the code i’m using. Please correct me if i’m wrong.
This is my s2-hacks.php code
In functions.php i have function like this
Its supposed to redirect me to change-password page. Instead it still redirect me to my-account page.
Am i applying filter incorrectly? Thanks
|Posted: Tuesday Mar 27th, 2012 at 2:52 pm #9264|
|Posted: Tuesday Mar 27th, 2012 at 6:57 pm #9304|
Hello Raam, I tried other support forums. I couldn’t get support in stackoverflow, wordpress stackexchange. Thats why i opened this thread. I finished the whole site. The only problem i have is login redirection problem.When i disable s2member redirection working correctly. Last two days i’m browsing all s2member file to find and remove the hook. And to be honest its really frustrating to spend more than 48 hours for one line code.
All i’m just asking you guys, just to tell me how to remove your s2member redirect hook and make login_redirect hook work.
Here is my simple code
I also modified the Jason’s code as per my needs. The only thing i have problem is in this line.
Can you tell me what is the filter name i should apply in wp_redirect. ?
|Posted: Wednesday Mar 28th, 2012 at 3:29 am #9331|
You could add a conditional to the Welcome page or a must-use plugin, check the login counter and based on that redirect the person to the profile page.
|Posted: Wednesday Mar 28th, 2012 at 3:31 pm #9361|
I’ll go with your method
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.