etellewyn
Member
Posted 1 year ago #
Need some help -- the blurb on the comment form that says "You must be logged in to post a comment" still takes users to the default wordpress login.php screen on the back end, not the members area/registration that wp-members generates.
Seeing as how this functionality (requiring users to be logged into comment) is the entire reason we are using this plugin, this is critical!
How do I get this to take people to the custom wp-members login/registration page?
http://wordpress.org/extend/plugins/wp-members/
@etellewyn - I know we have this resolved already, so I'm really just posting this in case anyone happens to be doing a search here for a similar issue. ;-)
This comes from the theme's comments.php file. Many theme's will call the WP comment_form() function at the end, so you want to look for where it does that. Then add a parameter for the 'must_log_in' as follows:
comment_form( array( 'must_log_in' => 'You must be <a href="<a href="http://yoursite.com/your-login-page">logged" rel="nofollow">http://yoursite.com/your-login-page">logged</a> in</a> to post a comment.' ) );
gauravchand
Member
Posted 7 months ago #
I am using WP 3.4.2 and theme twentyeleven. I could not find a call to the above function. I have the same problem as @etellewyn.
How do I solve it?
gauravchand
Member
Posted 7 months ago #
Disregard my comment above. Found the location for the code.
How do I redirect the user back to the post (where he clicked the link to login) after logging in?
AndyZuntz
Member
Posted 3 months ago #
I am only a beginner at this game, but I think there might be some double pasting in the advice from Chad above.
Rather than
comment_form( array( 'must_log_in' => 'You must be logged" rel="nofollow">http://yoursite.com/your-login-page">logged in to post a comment.' ) );
I think it should read
comment_form( array( 'must_log_in' => 'You must be logged in to post a comment.' ) );
It worked for me , anyway, once I had got the brackets all clear in my head
Thanks Chad for a great great plugin
Andy
AndyZuntz
Member
Posted 3 months ago #
That is interesting, it looks OK now that I have pasted back in here . Clearly something about the way it looks in Chad's version one above. Ignore me if I am not helping
Andy