We are building a landing page site (only 2 pages total) for a client where they are physically mailing out access codes to specific customers. Therefore, I am trying to create a login system where ideally, a user logs in with a pre-determined access code. I have been trying different hacks of a login type of but nothing is working to create a single-step, simple process.

The "verification" system that this site uses is close to what I'm looking for, but this system first verifies a purchase, then invites you to Register for a WP account. http://support.hogash.com/wp-login.php?action=register

I don't want users to have to register anything - I just want have a single entry field with pre-determined access-codes that then allows access to a secondary page.

This solution of pre-filling a password may have worked but the lack of pre-filling passwords won't work. We could have had the password field pre-determined and pre-filled (and possibly hidden) then the user enters his/her access code (i.e. username) How to prefill the username/password fields on the login page

I have searched hours over a few days for different solutions but nothing. Any ideas on how to solve this?

UPDATE 12/26/13: One of the most promising plugins that I've tried, at least on paper, is "Password Only Login" http://wordpress.org/plugins/password-only-login/

Via settings, you select what users you want to be able to login via special form w/ password only. But the shortcode to get the login form to show up on a page doesn't work. I've already reached out to the author, but ain't holding my breath.

  • What have you tried and why doesn't it fit your needs? In addition it feels like some info is missing, for example it is not clear to me why do you need a login stage at all. Dec 25, 2013 at 12:16
  • You could do this writing your own plugin. But security could be an issue if the code can be guessed. Would you be interested in me providing a plugin framework (code)?
    – user42826
    Dec 25, 2013 at 16:42
  • Thanks for the replies. @MarkKaplun - We are trying to make a login system that has the appearance of a "memembership only" section in the site. Yes, we could just "Password Protect" a page/post or do some of the other items offered, but that's not achieving the front end goals. It needs to offer the user a simple, clean, yet 'exclusive' feel to it. Not just a 'technically correct' solution. Dec 26, 2013 at 12:29
  • Thank You @user42826 - Security is not a huge issue (as long as they can't get into any admin/control panel/etc. I'm not concerned about guessing codes - they will be pretty secure and a string of alphanumeric characters. (We will be populating a few hundred of them via other mass-import plugins) Yes, I'd be interested in seeing a plugin/code/framework for it. Thank You. Dec 26, 2013 at 12:36

2 Answers 2


Would this free plugin help? http://wordpress.org/plugins/password-protected/

Perhaps you can use turn on the simple login for admins (requires password), then write a custom redirection script by modifying the plugin or add to functions.php so that if the password is correct, they are logged into a specific URL instead of the dashboard.

  • Thank You Denis. I've used that plugin on other sites to restrict access during development. It's too broad for this application - See comments to Mark above - we need to provide "exclusive access" to a portion of the site, not the entire site (what is currently shown is not all of it) Dec 26, 2013 at 12:38

Here is an suggestion, create a plugin on your own. The plugin should contains the access code generated manually by your client. It should have add/remove access codes options.

By having the access code you can do two type of access.

One is directing the end user to the destination page with the access code as query parameter. This url can be sent to the end user.

You need to grab the access code using get variable $_GET[''] and then check in your plugin db. If the access code is present then allow them to view the page or redirect them to 404(some error message).

Second method is to create a user programmatically with the mail ID your client mailed the end user, username as access code and set the password randomly. In the custom login page just allow the end user to enter the access code. Upon successful access code enter auto authenticate the user.

Let me know if you have any doubts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.