[resolved] [closed] Can't see protected pages/posts in archive listing if logged out (7 posts)

  1. jfcarter
    Posted 2 years ago #

    I am using the Groups plugin to protect certain posts, but the protected posts are not visible in the archive listing, if I am logged out.

    I need to be able to see the pages/posts in the archive listing when logged out, even if they are protected.

    How can I do this?


  2. jfcarter
    Posted 2 years ago #

    Also, I need to see the protected posts in WP_Query results and on menus, even if the posts are protected.

    I need users to be able to see the menu item and click on it, but they will be redirected (using Groups 404 redirect) if they are not in the required group.

  3. itthinx
    Plugin Author

    Posted 2 years ago #

    What you see is the intended behavior. The point of protecting those entries is so they don't show up unless you are logged in and have the right to access them.

    But if you just want those to show up in the menus and then have them directed to a page where they can log in, you can use custom links (Appearance > Menus > Links ... input the URL and and Link Text instead of using choices offered in the other sections).

    From what you say, I would assume you want to let them have a glimpse without showing the actual content. For that you can either protect the content inside the posts using the [groups_member] shortcode instead of protecting the whole post, or you can lighten the restrictions on post visibility which are imposed by the Groups_Post_Access class, based on the view that is offered of the post. For example, check whether it's an archive and offer the excerpt.

  4. jfcarter
    Posted 2 years ago #

    Thanks, this is really helpful.

    You are correct; the client wants to give users a glimpse of the content. I adjusted some of the filters and functions in the Groups_Post_Access class (class-groups-post-access.php) and so far it's working. I still need to test it more.

    Thanks again for your help.

  5. phantomdentist
    Posted 2 years ago #

    Is there any more information available on how this can be accomplished?

    I also need to achieve the same result, posts being visible on archive, index, category, tag pages etc but make the actual post itself protected.


  6. CuReSoft
    Posted 2 years ago #

    I would also realy need a solution for that.

    Anyone an Idea on how to show the posts on archive pages and protect the single posts?

    Thanks in Advance

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else's topic.

    I am now closing this 8 month old resolved topic as it references an older version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Groups
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic