Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jfcarter

    (@jfcarter)

    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.

    Plugin Author itthinx

    (@itthinx)

    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.

    Thread Starter jfcarter

    (@jfcarter)

    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.

    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.

    Thanks

    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

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can't see protected pages/posts in archive listing if logged out’ is closed to new replies.