• Resolved antcrescendo

    (@antcrescendo)


    Hello, I would like to know how to edit the link of my “forgot your password” to redirect to the correct language. When I am on my login page using my second language and click on the forget password link, it redirects me to my default password reset page instead of my second language. How can I resolve this problem?

    If an in-depth explanation is needed, please let me know

    Thanks,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @antcrescendo

    Which “Forgot your password” link you’re referring to? Is it in the default Login form in yoursite.com/wp-login.php ? or the one in the UM Login form?

    it redirects me to my default password reset page instead of my second language
    Are you using another plugin to translate the site? You need to customize it with the following code:

    add_filter("um_get_core_page_filter","um_080621_change_forgot_password_link", 10, 2)
    function um_080621_change_forgot_password_link( $url, $slug ){
          if( "password-reset" == $slug ){
               // do something
           }
        return $url;
    }

    You will have to modify the above code to change the URL.

    Regards,

    Thread Starter antcrescendo

    (@antcrescendo)

    I appreciate your quick response, @champsupertramp. I am referring to the forgot password link on the UM login page. Yes, I am using the Polylang multilingual translator plugin. Thank you for providing the code. Do I place the code inside my themes CSS? I provided a screenshot of the issue in the link below.

    https://postimg.cc/BjSVj9qP

    “Votre compte” translates to “account” in English and it should redirect me to the French version of that page, however, it redirects me to the English version. It appears to do this with multiple links. You will notice the link in the bottom left of the screenshot. I wouldn’t mind removing the button completely if that’s an option.

    Let me know if this helps.

    Thank you for your time and support.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @antcrescendo

    You can remove the “Your account” link with the following code snippets:

    remove_action( 'um_logout_user_links', 'um_logout_user_links', 100 );
    add_action( 'um_logout_user_links', 'um_080921_logout_user_links', 100 );
    function um_080921_logout_user_links(){
    ?>
    <li>
    <a href="<?php echo esc_url( add_query_arg( 'redirect_to', UM()->permalinks()->get_current_url( true ), um_get_core_page( 'logout' ) ) ); ?>">
    <?php _e( 'Logout', 'ultimate-member' ); ?>
    </a>
    </li>
    
    <?php
    }
    

    You can add it to your theme/child-theme’s functions.php file or use the Code Snippets plugin to run the code.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @antcrescendo

    To remove the Forgot Password? link, please use the following code snippets:
    remove_action( 'um_after_login_fields', 'um_after_login_submit', 1001 );

    You can add it to your theme/child-theme’s functions.php file or use the Code Snippets plugin to run the code.

    Regards,

    Thread Starter antcrescendo

    (@antcrescendo)

    Hello, @champsupertramp Thank you for all your support!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @antcrescendo

    Thanks for letting us know. I’m marking this as resolved now.

    Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Customize link in UM’ is closed to new replies.