• Resolved bearmedia

    (@bearmedia)


    I want to replace the standard WordPress login page with one that I made myself. Can I just use the following code as PHP snippet in WP Code?

    function my_login_page( $login_url) {
    return ( ‘YOUR_URL_HERE’ );
    }

    add_filter( ‘login_url’, ‘my_login_page’, 10 );

Viewing 1 replies (of 1 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @bearmedia,

    Yes, that should work, you do not need the parentheses in the return statement if you return a simple string but please be careful when enabling this snippet as you may end up not being able to access your website admin.

    In order to avoid issues I suggest:

    1. Make sure the login page works by testing it in an incognito window
    2. After enabling the snippet, immediately test the login page again and try logging in in an incognito window while still being logged-in as an admin so that you can disable the snippet if something goes wrong.
Viewing 1 replies (of 1 total)

The topic ‘Change WordPress login page’ is closed to new replies.