• Greetings,

    I am having trouble figuring how to grant privilages only to some role the ability to create and manage posts of a custom type.

    I cannot find any documentation on how to set this up, but this is what I have to date.

    When using WordPress API to create a custom post type, under “capability_type” I have put in a string of “Schools”

    Then when in URE I can see that there are 5/5 privilages under custom post types > schools

    Create Schoolss
    Edit Schoolss
    Edit others Schoolss
    Publish Schoolss
    Read private Schoolss

    note the extra “s”.

    When I am logged in as an admin and I attempt to add a “school” I get an error.

    “Sorry, you are not allowed to edit this post.”

    Even though I have privilege to “create schoolss”

    Any help or direction you can provide is greatly appreciated.

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    I see that you use Pro version. Please open a topic at the dedicated forum to get answers quicker. And post there the example of your code, which creates a custom post type. I will try to reproduce your situation. Screenshots of the settings “Additional modules” tab will be helpful too.

    What I can suppose currently, not seeing a code – you did not send capability type as parameter to WP custom post type registering API, and WordPress can use the default ‘post’ for it, like ‘edit_posts’, etc.

    At some stage you can turn ON the ‘Force custom post types to use their own capabilities’ check box at URE’s settings. URE created the set of user capabilities for the ‘schools’ post type.

    Yes, it simply adds ‘s’ to the end of the custom post type ID, similar to WordPress which adds ‘s’ to ‘post’ and ‘page’ post types. Pay attention that WordPress uses singular form for the post type ID.

    If currently that checkbox is switched OFF, WordPress can use ‘post’ capabilities for the ‘schools’ post type again. ‘schools’ capabilities do not work in this case.

Viewing 1 replies (of 1 total)

The topic ‘Creating Custom Post Types’ is closed to new replies.