• Does anyone know of a method or plugin that will allow me to restrict certain posts to certain users? For example, I have a custom post type, this post type contains around 100 posts.

    There are around 80 users in a custom role. Each user should be able to see in WordPress just the posts that they are responsible for. So when they go to the custom post type in WordPress, it may only show 1 post, the others are hidden.

    Admins however should be able to see all posts.

    Can we do this?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hey there,

    What comes to mind would be a User Role Editor plugin or even some membership type of plugin. I can’t think of any specific one but I’m sure there are several available

    You can use check current user role + current queried object and then use template_redirect hook to redirect them to wherever you want them to land.

    Thread Starter candell

    (@candell)

    Thank you for the replies, as far as I know User Role Editor will hide/show the entire custom post type, not just certain posts within the post type.

    wpfreelancer, is this in the backend?

    Yes you’d need a couple of custom functions done in functions.php. This file is found in current activated template.

    Thread Starter candell

    (@candell)

    Thabks, I am trying to make the posts list only show certain posts to each user. Essentially each user has a page they can edit, they can’t edit other pages.

    I think you would want some kind of membership plugin where you assign different levels to different posts. Here are some possibilities

    1. Restrict Content Pro: This is a powerful plugin that allows you to restrict access to content based on a variety of criteria, including user roles and custom fields.
    2. Advanced Access Manager: This plugin provides a comprehensive solution for managing access to your WordPress site and its content. You can use it to restrict access to specific posts or custom post types based on user roles or custom fields.
    3. Members: This is a simple, yet powerful plugin for controlling access to your content based on user roles and capabilities.

    Thread Starter candell

    (@candell)

    Thanks Janet, I created this post on the members board https://www.ads-software.com/support/topic/backend-post-access-to-specific-user/ as I could only figure out how to limit access to the entire cpt, not individual posts.

    If no-one replies, I’ll research wpfreelancer’s response in more detail.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Restrict each user to view only certain posts’ is closed to new replies.