• Resolved christodhunter

    (@christodhunter)


    Hi,

    We need to stop users from accessing content assigned to groups. This works perfectly, but we want those posts to show in search results so the user can see the content, before being prompted to sign up for a membership. We’re using Relevanssi and Search & Filter Pro to show the results. I assume that Groups is intercepting the query and adding a check for the user’s groups access. Is there a workaround for this so I can serve up all pages in the search results?

    Thanks

    Chris

Viewing 1 replies (of 1 total)
  • Hey Chris,

    What you can do is remove the access restriction from the post itself and restrict the content instead. Groups provides two shortcodes that will help you with that process when placed in the post.

    [groups_member group="Gold"]
    Only members of the Gold group can see this.
    [/groups_member]

    and

    [groups_non_member group="Gold"]
    Welcome to our site!
    Please consider acquiring a membership to access exclusive content.
    [/groups_non_member]

    All the members of the Gold group will see the first message, while all the others including visitors will see the second message when accessing the post containing those shortcodes.
    Furthermore, the post will be included in the search results and at the same time you can present the benefits of acquiring a membership.

    FYI, you can either use the shortcodes or even the Block widget if you already use the Block Editor.
    https://docs.itthinx.com/document/groups/blocks/
    https://docs.itthinx.com/document/groups/shortcodes/groups_member/
    https://docs.itthinx.com/document/groups/shortcodes/groups_non_member/

    Kind regards,
    George

Viewing 1 replies (of 1 total)
  • The topic ‘Allowing restricted pages in search results’ is closed to new replies.