Edit Register Link on Protected and LogIn/Account Pages

There's a register link on the protected content page, and the login page, and the account page if you are not logged in. That registration link goes straight to the registration form and bypasses the membership levels page. So, I have two questions:

#1: What level does that form set the registrant to without first selecting a level to register with?

#2: How do I edit that link?
It seems to be inserted as part of the shortcode. I'd rather it take you to the memberships page so the visitor can select how they'd like to be involved.

  • Ash

    Hello @Deborah

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    #1: What level does that form set the registrant to without first selecting a level to register with?

    By default, the member won't be associated to any level. If you have default membership activated, then the member will be added to that default level.

    If you want to assign a membership during registration, you can use the following code: https://gist.github.com/bappi-d-great/a50ab3599273a2308e2e

    #2: How do I edit that link?

    To edit that link, please try the following:

    add_filter( 'register', 'change_register_link', 99, 1 );
    function change_register_link( $link ) {
    	return '<a href="CUSTOM_LINK">Register</a>';
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.