• Hi everyone,

    I’ve set up several blogs, but this is quite an interesting puzzle I’m encountering, and I don’t know how to figure it out, as I’m weak at PHP…

    My fiance and I are setting up our wedding website, and it’s all run by WordPress. Only one page can be seen when you arrive on the site; all other links require typing the password that we’ve provided to our guests via “save the date” cards. We’ve set up a username of “guest” for visitors, but we don’t want to have them type “guest” in the username field. It should be as little work for them as possible (only entering the password, and hitting submit). Thus, is there a way I can hardcode the “guest” username in wp-login.php? My fiance and I are already logging in through a different login page so that we can modify wp-login.php, but I don’t know how to modify the code such that the value “guest” will be passed when a user hits the submit button.

    Any and all help is appreciated. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look in wp-login.php in your home directory.

    Find:

    <label><?php _e('Username or E-mail:') ?><br />
    		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label>

    Change:
    value="<?php echo esc_attr($user_login); ?>"

    Tp:
    value="guest"

    That might work…

    Thread Starter jasonag77

    (@jasonag77)

    That did it! Actually, I went one step further and made an input type=”hidden” so users won’t even see anything other than the password field.

    Thanks for pointing me in the right direction!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to hard code a specific user on wp-login?’ is closed to new replies.