The editor role is able to open following URL:


But not able to open following URL:


I am facing this amazing problem as when I pass other parameters with post_type then it is opening custom post type edit screen but when I only pass post_type then it is not opening.

This is only happening with editor role.


function create_booking_post_type() {

    $labels = array(
        'name' => __( 'Bookings','framework'),
        'singular_name' => __( 'booking','framework' ),
        'add_new' => __('Add New','framework'),
        'add_new_item' => __('Add New booking','framework'),
        'edit_item' => __('Edit booking','framework'),
        'new_item' => __('New booking','framework'),
        'view_item' => __('View booking','framework'),
        'search_items' => __('Search booking','framework'),
        'not_found' =>  __('No booking found','framework'),
        'not_found_in_trash' => __('No booking found in Trash','framework'),
        'parent_item_colon' => ''

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        'has_archive' => true,
        'capability_type' => 'post',
        'hierarchical' => true,
        'menu_position' => 5,
        'supports' => array(
        'rewrite' => array( 'slug' => __('booking', 'framework') )

  • Please show us the code creating the custom post type.
    – Max Yudin
    Commented Aug 17, 2016 at 9:40
  • @MaxYudin, here is code: textuploader.com/58c9d Commented Aug 17, 2016 at 10:12
  • Can not reproduce the problem. Do you use any user roles managing plugins or custom code? Also, where do you get booking-status=booked query in the URL?
    – Max Yudin
    Commented Aug 17, 2016 at 10:54
  • @MaxYudin, additionally I have created custom taxonomies like booking-status, booking-types, booking-features etc. I am using user role editor plugin. Commented Aug 17, 2016 at 11:13
  • So, please edit your question adding necessary information including taxonomies and editor role settings.
    – Max Yudin
    Commented Aug 17, 2016 at 11:16

1 Answer 1


What you need to do is to make custom user meta fields.

Links these metafields to a custom category linked to your custom post type.

Use this code for a checkbox feeling:

<input  type="checkbox" id="category-<?php echo $post_type->term_id ?>" <?php if($user_cats[0] && in_array( $post_type->term_id, $user_cats[0] )) echo 'checked=checked';?> 
            name="categories[]" value="<?php echo $post_type->term_id;?>"/>

Every custom category you make in the custom post type will be linked to the users profile. this way you can assign posts to a certain user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.