• Resolved kibus90

    (@kibus90)


    Hello,
    I would like change default link login page, but I dont know how.

    My code looks like that:

    
    function rstheme_action_url_redirect( $url, $action, $instance ) {
    
    	// useful if you're in sub-domain, you can also change a bit more like using get_permalink( $page_id )
    	$site_url = get_bloginfo( 'url' );
    
    	switch ( $action ) {
    		case 'register' :
    			$url = $home_url . '/subscribe/';
    		break;
    		case 'lostpassword' :
    			$url = get_permalink( 10 ); // where 10 is the new lost password page
    		break;
    	}
    	return $url;
    }

    add_filter( ‘tml_action_url’, ‘rstheme_action_url_redirect’, 10, 3 );

    and it works well. But I would like to change a default link login page. How can I do it?
    Thank you for help and greet.

    • This topic was modified 7 years ago by kibus90.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter kibus90

    (@kibus90)

    Also I have question – how can I get defined shortcods for each site like: “login”, “register”? I see when I change he addresses page, then ita doesn’t work good (e.g. there aren’t displaying notifications about wrong login or password etc.)

    Plugin Author Jeff Farthing

    (@jfarthing84)

    You could just change the slug of the default login page?

    Thread Starter kibus90

    (@kibus90)

    Hello
    Thank you for your answer!

    No, no, I would like to change a address of page – like mypage.com/custom-login-page/

    I tried by code:

    break;

    		case 'login' :
    			$url = get_permalink( 33 ); // where 10 is the new lost password page
    		break;

    But its doesn’t work

    Could you help me?

    • This reply was modified 7 years ago by kibus90.
    Plugin Author Jeff Farthing

    (@jfarthing84)

    Changing the slug of the Login page would achieve just that.

    Thread Starter kibus90

    (@kibus90)

    I don’t understand you.Could you explain more? Is there possibolity change it by Snippest Code?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Go to WP-Admin -> Pages. Click the “Quick Edit” link below the Login page and change the value for “Slug”. Save. ??

    Thread Starter kibus90

    (@kibus90)

    Okey, but it will be change also in redirect at plugin?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Sorry, I’m not sure what you mean.

    Thread Starter kibus90

    (@kibus90)

    Hm, when I will change slug for site e.g. “my-custom-login-page”, then it will be changed only in front-end. But when I press in some part my websites for link “Login” (which is generated automatically by wordpress and plugin), then the redirection is to page with thr slug “login”, not to my “my-custkm-login-page”.
    Sorry for my English and thank you.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    TML uses the page slug for the Login page. If /login is still being used after you changed it, it is either cached or it is hardcoded wherever you’re seeing it.

    Thread Starter kibus90

    (@kibus90)

    Aa, okey, so I will check it and let you know.
    Thank you for patetion and help!

    Thread Starter kibus90

    (@kibus90)

    Okey, its work, thank you!

    • This reply was modified 7 years ago by kibus90.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How can I change link login page?’ is closed to new replies.