Take the tour ×

I don't want people to have to log in, I just want to prompt them with a question and if they can answer it, they can access the site. All the solutions and plugins that I've found seem to be overkill for my needs. Does this kind of thing exist?

share|improve this question
add comment

2 Answers

You could add a statement to the end that require them to answer a question if they dont have a cookie set and sets a cookie when they do, allowing them access to the site. I'm on my phone but something like this.

if($_POST['q'] == 'answer') { 
// set cookie
} elseif($_COOKIE['q'] != 'cookie') {
// include question template and die
share|improve this answer
this is the kind of thing that I am looking for, I was just hoping that there was a plugin that did it for me :-) –  ninesided Dec 28 '11 at 22:11
I'll modify the code I've written to provide a full solution, if you like - let me know. You can accept my post as an answer using the little green tick to the left of it, if you feel I've helped. –  George Pearce Dec 28 '11 at 22:49
if you wouldn't mind that would be much appreciated - I'll +1 you for now, will give you a tick if it works :-) –  ninesided Dec 28 '11 at 23:08
add comment

Alternatively, you could use HTTP authentication on your webserver for the folder your WordPress installation resides in.

If you're using Apache, you can use the following documentation to configure it: http://httpd.apache.org/docs/2.2/howto/auth.html

If you use Lighttpd, you can check out this page: http://2skies.com/docs/basic_http_authentication_with_lighttpd

share|improve this answer
wouldn't this require both a username and a password? I wouldn't have the opportunity to ask the user the secret question! –  ninesided Dec 28 '11 at 22:12
add comment

Your Answer


