• Hi,

    I’m learning to customize the capabilities for different roles for different custom post types in my site. I use the User Role Editor plugin to assign the capabilities.

    For each custom post type, I wrote this in the register function:

    'capability_type' => 'custom_name',

    I understand that this will give me the same effect as:

    'capabilities' => array(
    	'edit_post' => 'edit_custom_name',
    	'edit_posts' => 'edit_custom_names',
    	'edit_others_posts' => 'edit_others_custom_names',
    	'publish_posts' => 'publish_custom_names',
    	'read_post' => 'read_custom_name',
    	'read_private_posts' => 'read_private_custom_names',
    	'delete_post' => 'delete_custom_name',
    ),

    What I don’t understand is,

    1. Do I need to specify the ‘read_custom_name’ capability for each of the roles that are supposed to be able to ‘see’ the posts?

    What about guests? How does these capabilities affect guests?

    I’m trying to find out:

    2. How to make sure that guests are ABLE to see the custom post type with the custom capability?

    3. How to DISALLOW guests to see the custom post type (in case I want it to be a hidden post type for specified roles only)?

    Thank you, I hope someone could enlighten me about this ??

  • The topic ‘Custom post type Capabilities for Guests’ is closed to new replies.