WP-Members: Membership Framework
[resolved] [Plugin: WP-Members] Comment login link still goes to default WP-login! (6 posts)

  1. etellewyn
    Posted 4 years 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?


  2. Chad Butler
    Plugin Author

    Posted 4 years ago #

    @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.' ) );

  3. gauravchand
    Posted 3 years 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?

  4. gauravchand
    Posted 3 years 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?

  5. AndyZuntz
    Posted 3 years 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


  6. AndyZuntz
    Posted 3 years 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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic