• Resolved Purnendu

    (@impurnendu)


    Hi,
    I tried to change the login URL to submit an article. I don’t want to use wp-login.php as default login URL.

    I tried the code but didn’t work.

    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 “https://mydomain.com/login/”.$r;
    }

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeff Starr

    (@specialk)

    I’m not sure, where did you find that code? Is it a part of the plugin or some support thread, etc.

    Thread Starter Purnendu

    (@impurnendu)

    Sorry, this code is very old and not working now. But I found the updated code from WordPress- https://developer.ww.wp.xz.cn/reference/hooks/login_url/

    But if you check my website- https://edukareonline.in/bulletin/write-for-us/
    You can see that it is still wp-login.php

    Thread Starter Purnendu

    (@impurnendu)

    Problem is solved…

    Thread Starter Purnendu

    (@impurnendu)

    Hi, I just reopened this topic to ask another question.

    Is it possible to use custom login page (I already created with a membership plugin) on Writing submission page instead of default login page??

    Plugin Author Jeff Starr

    (@specialk)

    In general, you can create anything you want with WordPress. The question is how do you want to include/use your custom login page with USP? For example, do you want to add a link to your new login page on the USP form? Or something else? Help me to understand so I can provide accurate infos, thank you.

    Thread Starter Purnendu

    (@impurnendu)

    Yes you are right.

    For example, when someone tries to write a guest article on my site (allowed to logged in users only), they are forced to login with the default wordpress login url! I want to change that url.

    (Even, I don’t want to use your plugin’s own login shortcode).

    Plugin Author Jeff Starr

    (@specialk)

    Thanks for explaining. It’s not a current feature of the plugin at this time. Definitely an interesting idea though.

    Thread Starter Purnendu

    (@impurnendu)

    Thank you for your reply. I am now closing this topic and wish we can get that feature in near future.

    Plugin Author Jeff Starr

    (@specialk)

    I have added it to the idea list and will see about adding in a future update. Your feedback is appreciated, @impurnendu.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Login URL’ is closed to new replies.