Forgot Password Redirect

This topic contains 6 replies, has 3 voices, and was last updated by  Patrik 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #446270

    Richard Parry
    Expired Member
    Post count: 121

    Hello,

    I have read (https://wpgeodirectory.com/docs/redirecting-the-login-page/). I would also like to redirect the ‘forgot password’ link to my own page. What $args[‘???’] do I need to use in the function ‘my_geodir_login_url’ to redirect the forgot password link?

    Many thanks,

    Richard

    #446282

    Kor
    Moderator
    Post count: 16516

    Hi Richard,

    Thanks for your post. You can use the code from this answer https://wordpress.stackexchange.com/a/248425 to achieve what you needed there. Could you give it a try?

    Thanks!

    #446383

    Richard Parry
    Expired Member
    Post count: 121

    Unfortunately this did not work for me. I would like to redirect to the woo commerce lost password link. Are you sure there is not an argument in the ‘my_geodir_login_url’ function that could be used for this purpose? Richard

    #446389

    Kor
    Moderator
    Post count: 16516

    Hi Richard,

    Thanks for your reply. I will forward this to a developer for a second look.

    Thanks!

    #446398

    Patrik
    Moderator
    Post count: 1971

    Hi Richard,

    Can you try the following code and let me know if it works for you or not?

    
    
    add_filter('geodir_login_url','my_geodir_login_url',10,3);
    function my_geodir_login_url($login_url,$args,$gd_page_id){
        if(isset($args['forgot'])){
            $login_url = 'http://your-site.com/lost-password-page';
        }
        return $login_url;
    }

    Regards,
    Patrik

    #446399

    Richard Parry
    Expired Member
    Post count: 121

    Hi Patrik,

    So the following code will work on the my-account woocommerce page:

    add_filter( ‘lostpassword_url’, ‘my_lostpassword_url’, 10, 0 );
    function my_lostpassword_url() {
    return site_url(‘my-account/lost-password’);
    }

    But it does not change the link in the my account drop down in the menu. I think I need the to specify the appropriate argument in the ‘my_geodir_login_url’ function.

    Ricard

    #446413

    Patrik
    Moderator
    Post count: 1971

    Hi Richard,

    Can you try the code I provided here: https://wpgeodirectory.com/support/topic/forgot-password-redirect/#post-446398

    If possible provide me the admin and FTP details in private reply so that I can look more into this and fix it on your site.

    Regards,
    Patrik

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket