• Resolved bclaim

    (@bclaim)


    Hi,

    Is there a way to just hide the Register link on the Login screen, rather than the Register and the Lost password link?

    Is it also possible to change the Register link on the login screen to go to the WooCommerce login/register area? (/my-account/)

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @bclaim

    I hope you are doing well.

    You can use a custom CSS to remove only the register option.

    #loginform + #nav a:first-child{
        display: none;
    }

    You can use at the Custom CSS option at the login module.

    About the login redirect, I’m afraid the plugin won’t modify the URL structure, but this code can be a workaround:

    <?php
    
    add_action(  'login_init', 'user_registration_login_init'  );
    function user_registration_login_init () {
         if( $GLOBALS['pagenow'] === 'wp-login.php' && ! empty( $_REQUEST['action']  && $_REQUEST['action'] === 'register' || $_REQUEST['action'] === 'register/' )) {
            wp_redirect( '/my-account' );
            exit;
          }
    }

    You can install this code as a mu-plugin or on your child theme’s functions.php

    To find more about Mu-plugin:
    https://premium.wpmudev.org/docs/getting-started/download-wpmu-dev-plugins-themes/#installing-mu-plugins

    Best Regards
    Patrick Freitas

    Thread Starter bclaim

    (@bclaim)

    Hi Patrick,

    Thank you for the very informative reply. This works great!

    Thanks again for your assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Register and Lost Password Links’ is closed to new replies.