Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing the registration link on dashboard login form

  • Avatar of Lriggle
    Lriggle
    Participant

    @lriggle

    Without going into the wp-login.php and changing the file manually, is there a way to point the registration link on the wp-login.php to MyDomain.com/registration instead of MyDomain.com/wp-signup.php?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    hi,yes, you can.

    Put this code in your current themes functions.php and it will make it work.

    add_filter("site_url","my_custom_register_url",10,3);

    function my_custom_register_url($url, $path, $orig_scheme)

    {

    if($orig_scheme=="login")

    {

    if($path=="wp-login.php?action=register")

    return get_option('siteurl')."/register";

    }

    return $url;

    }

    Let me know it worked for you or not :)

    Using this method, you can actually modify lots of other links! Very helpful. Thanks Brajesh!

    *edit: Quite not working yet. Gives me

    Parse error: syntax error, unexpected $end in /home/domain/public_html/wp-content/themes/bp-sn-parent/functions.php on line 81

    Did I add this on a bad line or something?

    Avatar of Lriggle
    Lriggle
    Participant

    @lriggle

    I haven’t tried it yet, I’ll do that when I get home this evening.

    Mangaa: did you use both the grey blocks in Brajesh’s post?

    there is a missing ” } ” that is not shown… add one at the end of the code to make it work

    Oh man I feel embarrassed!

    Am I supposed to edit my_custom_url ? ^.^

    Avatar of Brajesh Singh
    Brajesh Singh
    Participant

    @sbrajesh

    hey

    Sorry ,It is there but it is outside the code block(gray area),seems my keyboard played wrong with me :D ,so it is not showing in the gray code area.If you are copying the gray code only ,add an extra ‘} ‘ ,as suggested by nexia .Or if you copy upto oneline below the code block in my post ,that ‘}’ is included :)

    Avatar of Lriggle
    Lriggle
    Participant

    @lriggle

    Worked first time! Thanks for the tip!!!

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

You must be logged in to reply to this topic.