#2666
Vladimir
Keymaster

Often custom post types are protected with the same capabilities set as the built-in posts: edit_posts, edit_others_posts, etc.

In order to check what capabilities are in use for the custom post type you may use “Admin menu access” add-on.
Activate it and open for ‘Administrator’ role. Found ‘Testimonials’ at the list of menu items opened. Look what it’s shown at the ‘User capability’ column.

Other way to check selected post type capabilities is to add this code to the functions.php and look at its output at the admin page HTML source:


add_action('admin_head', 'debug_output');

function debug_output() {
    $post_type = get_post_type_object('post'); // replace post with custom post type ID if needed
    echo '<!--start debug---' . PHP_EOL;
    print_r($post_type->cap);
    echo '---stop debug-->' . PHP_EOL;
}

If it uses its own capability, like ‘edit_testimonials’, just grant/revoke them with URE.
If it uses ‘edit_posts’, etc. you have 2 options:
1) block access to other post types blocking access to their menu items via “Admin menu access” module.
2) Activate “Force custom post types to use their own capabilities” option at the “Settings->User Role Editor->Additional Modules” tab. Any custom post type (including reserved one, like ‘attachment’ will use its own capabilities set.