Change WordPress user roles and capabilities Forums Bug Reports "capability_type" => "page"

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1805
    interactius
    Participant

    I can’t set permission by custom post type if capability_type is set as page, I can see it i is defined as post.

    Thanks in advance

    #1806
    Vladimir
    Keymaster

    I tested the custom post type with “Custom Post Type UI” plugin in order to help you. Capability type was set to ‘page’. Such custom post type is unavailable to user without ‘edit_pages’ capability as expected. Open “Admin Menu” for the ‘Administrator’ role and look, what real capabilities are in use to protect your custom post type.
    Some mistake takes place possibly if you define custom post type using PHP code and it takes default ‘post’ capability type then.

    #1808
    interactius
    Participant

    I want to assign permissions to a custom post type, not to every page. If I declare custom post type as page it doesn’t show in Custom capabilities as checkbox.

    Thanks!

    #1809
    Vladimir
    Keymaster

    Pay attention that WordPress has 2 built-in post types: ‘post’ with capability type ‘post’ and ‘page’ with capability type ‘page’. When you set capability type of your custom post type as ‘page’ you will not see any new capability at ‘Custom capability’ as there is a set of WordPress built-in capabilities, like ‘edit_pages’, ‘delete_pages’, ‘publish_pages’, etc.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.