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

Thanks

share|improve this question

1 Answer 1

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" 
   rel="lightbox[login-form]" 
   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

 
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.