WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using WP3 with the defaul theme. I would like people to register before submit a comment.

What I'm trying to do is having a link instead of the comment form that says something like "Leave a comment". Clicking this link would open a popup window with a login/register form or the comment form if people already signed in.

Is this even possible?


share|improve this question

My recommendation would be to use a plug-in like Lightbox Plus to power your link. Clicking the link would load your standard login form inside a lightbox. You could then automatically redirect to the same page so that, once logged in, users can leave a comment.

Basically, you'd dynamically build your link to be something link this:

<a href="http://yoursite.com/wp-login.php?redirect_to=http%3A%2F%2Fyoursite.com%2Fpostname" 
   title="Please login to comment">Login to Comment</a>

This would load the login form in a lightbox and set it to redirect to the post upon successful authentication. This might be all you need, but I haven't tested it ... so give it a try and, if needed, add some other scripts to reload the page upon successful login.

share|improve this answer
Thanks, I'll give it a try. – fana Oct 1 '10 at 9:57
I'm trying to get this to work, but the link just directs me to the login page. Should Lightbox Plus automatically pick up on the rel="lichtbox[login-form]" ? – Stephan Muller Jan 17 '11 at 10:17
Nevermind, using classes (one of the options) it works. Thanks! – Stephan Muller Jan 17 '11 at 10:21
What I did for the login/register form on 2010.wphonors.com is created a separate file with the login form, and include it into the hidden div in the footer of the site. Then when you click on the login/register menu item it is displayed in a thickbox. – jaredwilli Feb 2 '11 at 23:08

Your Answer


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.