Found it!
I was missing one custom capability. To the code above, I added this line:
$rol->add_cap( 'edit_' . $cap[0] );
It gives the capability edit_ctpsinglename. (edit_pb_publicacion).
And now it works just fine.
Hope someone find’s this useful.
Related Posts:
- WordPress custom post type capabilities issue
- Capabilities and Custom Post Types
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Row actions for custom post types?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Allowing custom role access to custom post type in back end
- Add content in custom post type page after the title and before columns
- Hide/Show only specific categories in wp-admin new-post.php
- Best way to filter featured image text for a custom post type?
- Notice: map_meta_cap was called incorrectly
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- How to not allow custom roles to edit published custom post types?
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- how to create my own edit.php admin page code or template for my custom post type
- Using Custom Meta Capabilities on Custom Post Type
- How do I code access to the built-in UI of a CPT when it’s placed as submenu of another CPT that is protected by role?
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Changing the header on post listing page in admin area
- Prevent author role from editing all posts in custom post type?
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- Allow Users Access to Custom Post Type Only
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Custom Role can’t trash Custom Post Type
- Remove “Get Shortlink” button in admin of custom post type
- Show hierarchical relationship between to custom post types on admin list
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- How to customize admin posts based on the user who is logged in
- Get all of user’s custom post types in WP Admin for plugin
- Cannot attach media when capabilities added to custom post type
- Admin notice not displaying
- submenu item edit a specific post
- How to avoid manage posts screen duplicates when two plugins use the same library
- WordPress theme custom capabilities not works
- How to restrict CPT post’s fronted view only for specific user roles?
- Modify action buttons for custom post type
- Role capability delete multiple post type posts doesn’t work
- Add a button or image button that calls wp functions in the wp-admin
- Selecting a post in Dashboard
- Custom admin post.php page
- Define new user capability for custom post types?
- Custom Taxonomy back-end customizations
- Custom post types as sub menu pages and role capabilities issue
- Restrict Access to Posts based on Custom User and Post Meta Data
- Filter term taxonomy metabox in custom post type
- CPT post count is 0 for the authors in the User list
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- Tracking changes in admin-page so user gets warning when leaving the page
- Allow add new post access to custom post but not wp post for some role
- Cannot Create new Post within Custom Post Type
- Allow user to only access custom post type
- Grouping of CPTs and taxonomies into menu groups in admin
- Creat new admin url for custom post type
- Custom Field values not Showing in Edit Page of Custom Post Type
- Custom WP_Query doesn’t display all posts
- Role capabilities issue
- How to get the custom post list to admin user edit page?
- Copy order items with metadata between orders – Woocommerce
- Custom Post Type – Portfolio no longer works
- How do I edit the WordPress post.php file?
- Add data to post edit page, when post is published
- Multiple wp_editor instances in custom post type using Ajax
- custom post type capabilities – needs to be VERY secure
- How to display author details in a custom post type in the wordpress backend?
- Add Content Column to Custom Post Type backend
- How to fix the Post Preview Button (CPT & map_meta_cap)
- Restrict Custom Post Type per role in Dashboard
- Change Text in Admin Panel
- Restrict access to custom post type based on its taxonomy terms
- How can I put content before my custom post type default pages?
- Restrict access only of custom post type with standard capabilities to edit_post
- get_posts() returns empty on custom post type /wp-admin/edit.php
- Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
- list articles in admin showing nested categories or slugs?
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- How to display an admin-notice after custom post type edit modification
- CPT requires manage_options and edit_posts for some reason
- Sort custom post column by generated value?
- How to only display all posts to a custom User Role?
- Add Custom Field in Product in WP Admin and send to Order Webhook
- Publishing failed. The response is not a valid JSON response
- Limiting the Number of User Posts to Their Own Posts
- How to overwrite function to display parent page combobox for custom post type in Edit Post Page?
- Can’t see post status drop down for custom post type
- How to override post-new.php with custom template
- How can I remove “Add new” button on custom post type
- Capabilities and mapping required for a role to be able to edit other’s posts of a custom type, BUT only be able to edit their own blog posts
- Remove Custom Capability
- Edit is changing my custom’s post type parent id
- Weird capabilities / roles behavior
- Custom Post Type Pagination Problem in Admin Section
- Capability to edit own post, but not create new one
- Filtering in admin broken for custom post type in 3.8.1?
- Custom post type won’t take my custom fields
- Change the text on the Publish button
- Custom role, capabilities, and post type: preview button wrecks things
- How to add post of custom type to a category with custom type capabilities
- Restrict editing of a custom post type based on status and user capabilities
- Change CPT Edit Target Link for Admin List