Where to update Login and Register Link

Solved4.60K viewsIssues
1

I’m trying to update the link for Login and Register.

There used to be an Option to change/set the URL for Login and Register URL. But, I can’t find them with latest 2.3 update.

If it was removed, can it be added back to Option?

0

Yes that option has been removed, you can use hook to update login link:

add_filter( 'login_url', 'my_anspress_login_url', 10, 2 );
function my_anspress_login_url( $login_url, $redirect ) {
	//check if anspress and update login link
	if(is_anspress())
    	return 'YOUR LOGIN LINK';

    return $login_url; // if not AnsPress return default link
}

This will update register link:

add_filter( 'register_url', 'my_anspress_register_url' );
function my_anspress_register_url( $register_url) {
	//check if anspress and update login link
	if(is_anspress())
    	return 'YOUR REGISTER LINK';

    return $login_url; // if not AnsPress return default link
}

Hi Rahul!
I tried to use those hooks and it didn’t work. Anyway, I’m just using a redirect for now, so it’s fine.
But if it’s not too much trouble, I think that it would be really nice to have the Option to change the URL for Login and Register back in Anspress settings. If not, since Anspress is using Theme My Login, it would be great if it would just pick the url of the pages associated with TML. 😉
Thanks again for all your work!
Fred