• Resolved farmerisaac

    (@farmerisaac)


    I have a custom post type called Careers which I coded. I used the Members plugin to create a role called Human Resources. The idea is that users with the Human Resources role can only edit, publish, or delete CPTs of type Careers. When I go to the Members plugin to adjust capability permissions, my CPT (Careers) does not appear, so I cannot set permissions for it. It is my understanding that when a CPT is present, the Members plugin sees it and adds it as a clickable item when editing a role (on the left sidebar, where General, Posts, and Pages are located). However, I am not seeing it appear, so I can’t do anything to limit what the Human Resources role can do (kinda defeats the purpose of the plugin).

    Am I missing something here? Is there something special I need to do when creating a CPT to get Members to find it?

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter farmerisaac

    (@farmerisaac)

    SOLVED

    I added the following code to my custom post type’s $args array.

    ‘capability_type’ => array(‘career’, ‘careers’),

    ‘map_meta_cap’ => true

    This made the Careers CPT appear in the sidebar and the inherited capabilities from the Post post type also appeared (with their proper CPT names). I tested it out and granted/denied permission as needed for the role, and it worked!

    Hopefully this helps anyone else having this issue.

Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type Not Showing’ is closed to new replies.