WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] Why are posts labeled 'password protected' and requre a password? (8 posts)

  1. David Bigler
    Member
    Posted 1 year ago #

    I don't want the password field to be displayed in the post if I'm not signed in - I only want the fields to either sign in with my existing username and password or be able to register. Also, how do I display the excerpted content so users will know they are on the right page?

    Any advice? Thanks!

    David

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    The plugin, as part of automatically protecting comments from view, spoofs WordPress into believing that posts are password protected. Rather than actually setting a post password for the post, this is generated on the fly.

    In some rare instances, this may cause the password protected dialog to display and request a post password (for which there really isn't one). This appears to be one of those cases.

    For cases such as these, there is a filter hook in the plugin for the auto-generated post password. Using this filter hook allows you to return an empty value for the post password, which should return WordPress to believing there is no post password (which there really isn't).

    Info on that filter and an example snippet is available in the Users Guide here:
    http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_post_password/

    (NOTE: if you are not familiar with using filters and action hooks in WP, snippets like this go in your functions.php file.)

  3. David Bigler
    Member
    Posted 1 year ago #

    Thank you for the quick response, Chad. I really appreciate your hard work on the plugin. I'll work on getting the filter hook implemented.

    Thanks again,
    David

  4. David Bigler
    Member
    Posted 1 year ago #

    Worked perfectly. Yay and thanks!

  5. cbrendlinger
    Member
    Posted 1 year ago #

    I am having the exact same problem on a page that I have blocked requiring that users register or login in order to view the page. However, when I include the filter in the functions.php file, the password protected dialog does not show up but neither does the login dialog... The entire page displays without requiring any kind of login at all. Am I missing something? http://www.exitmap.com/planning-tools/buyers-sanity-check/

  6. cbrendlinger
    Member
    Posted 1 year ago #

    Just a little more info when the filter is in place and I am not logged on. The entire page displays and then below it is a logout link followed by the wp-members login and registration forms which is the content that I actually want to display.

  7. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    If the entire page displays above the login/registration form, then it sounds to me like you have (1) set the plugin to display excerpts, (2) this content is a page (as opposed to a post), and (3) you haven't set an excerpt using the 'more' tag.

  8. cbrendlinger
    Member
    Posted 1 year ago #

    You were absolutely right... I did have the plugin set to display excerpts. I don't even know why I had that box checked as I am only using the plugin to block entire pages. I updated the settings and modified the functions.php file with your recommended filter and it worked like a charm. Thank you SO much! (Oddly, it wasn't doing this until I upgraded to WordPress 3.5...)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic