• Resolved blakemiller

    (@blakemiller)


    I use the Groups plugin on many different sites and love it. One thing I like about it is that it removes posts from the loop (and navigation if applicable) for users that are not in the group.

    However, I have a new project where we would like to show the posts in the loop, but then block access to the actual post (or page).

    The use case is a site that host virtual events and webinars – some are free, some are paid/exclusive access which we are controlling by the Groups plugin. virtual event platform. The sessions (Custom post types) are displayed on a list/loop. Typically, we hide any sessions that a user isn’t a part of. However, in this case, we’d like to display the session in the loop, but block access and in doing so, send the user to an “upgrade” page where they can upgrade their ‘membership’ per se, and then gain access to the actual posts.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kento

    (@proaktion)

    Hi Blake,

    Many thanks for using Groups in your projects, it’s really always great to get that kind of feedback!

    One easy way to achieve what you describe would be to leave access to those sessions unprotected but protect the content inside those sessions instead.

    For example, let’s say you have “Session A” which you would normally protect wholly by applying a group to access it. If a non-member visits the site, that “Session A” will be completely hidden from his view.

    Now take another “Session B” which you do not protect, but use the Groups Member block or the [groups_member] shortcode to surround and protect the content inside that post. If a non-member visits the site, he will be able to see the post but will not be able to see the content within it.

    You could also add a Groups Non-member Block or use the [groups_non_member] shortcode to invite those visitors who do not have access to sign up and point them to the upgrade page.

    Documentation references:

    – Blocks https://docs.itthinx.com/document/groups/blocks/
    – Shortcodes https://docs.itthinx.com/document/groups/shortcodes/
    – Partially protect content within sections https://docs.itthinx.com/document/groups/access-control/content-sections/ – gives a few examples using shortcodes, of course blocks can be used instead.

    Another approach could be based on removing Groups’ filters temporarily where protected content should be revealed. For that I would recommend to review the filters that Groups hooks into https://github.com/itthinx/groups

    Given that there are the approaches described, I’ll mark this as resolved, but please don’t hesitate to ask if you need further help on this topic.

    Cheers

    Thread Starter blakemiller

    (@blakemiller)

    Thank you for responding so quickly with so much detail. Those are good ideas and I will use them in this next project. Probably use the hide/show content WITHIN the post option.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show in Loop (and Nav) but Block Access to Post’ is closed to new replies.