Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
    
I found this post on the "related" list on the left side after responding to this post: wordpress.stackexchange.com/questions/83926/… I eventually found this plugin which seems to do what I need. wordpress.org/plugins/oa-social-login –  user3143112 Jul 13 at 4:38

2 Answers 2

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

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.

<?php 
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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