• Resolved tarilavkush

    (@tarilavkush)


    Hi Guys i wanted to know how can i change a default sign in link in Wp Ad Posting Page.
    for eg: when i click on sign in currently i am redirected to mywebsite.com/wp-login.php page.
    I want it to redirect to mywebsite.com/myaccount/

    Thanks in Advance

Viewing 1 replies (of 1 total)
  • Thread Starter tarilavkush

    (@tarilavkush)

    hi i solved the problem by adding below code to function.php file
    function my_register_url( $url ) {
    if( is_admin() ) {
    return $url;
    }
    return “https://yourpage.com/wp-admin/”;
    }
    add_filter( ‘login_url’, ‘my_login_url’, 10, 2 );
    function my_login_url( $url, $redirect = null ) {
    if( is_admin() ) {
    return $url;
    }
    $r = “”;
    if( $redirect ) {
    $r = “?redirect_to=”.esc_attr($redirect);
    }
    return “yourpage.com/account/”.$r;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘How to change Sign in Link in Wp Ad Posting Page’ is closed to new replies.