Restrict all posts for custom post type

Hi there, how do we just block all posts from a specific custom post type? We want to block groups from seeing all the posts in our custom post type.

3 Responses to Restrict all posts for custom post type

  1. George May 6, 2020 at 12:43 pm #

    Hey Thomas,

    By default all posts will be publicly accessible, so in order to block access you need to implement a custom function to run through your posts and assign each one to a group.
    Perhaps you should also have a look at Groups API and especially
    http://api.itthinx.com/groups/source-class-Groups_Post_Access.html#491-529

    This would apply for your existing posts, but if you like to extend it also to new posts, then you need to do the same process when ie the post is published or added.

    Hope it helps.

    Kind regards,
    George

  2. Thomas Trudeau May 5, 2020 at 3:18 pm #

    Yes it does, and it’s checked. We don’t want to restrict posts one by one, we want all posts for that post type to be blocked, current and new ones that are made.

    Thanks for any further help.

  3. George May 5, 2020 at 12:13 pm #

    Hi Thomas,

    Thanks for using Groups on your site.

    The setting required which allows you to restrict various post types, is to select this post type under Groups > Options in Post types section. Does your post type appear in the list rendered?

    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share