title: How can I allow the subscriber role to edit and delete their own custom post type
body: <p>I have a custom post type, and i want a subscriber roll to be able to edit and delete their own posts. i have the next code:</p>
  
  <pre><code>function agents_create_post_type() {
  $labels = array(
      'name'               =&gt; __( 'Agents', 'ee' ),
      'singular_name'      =&gt; __( 'Agent', 'ee' ),
      'add_new'            =&gt; __( 'Add New', 'ee' ),
      'add_new_item'       =&gt; __( 'Add New Agent', 'ee' ),
      'edit_item'          =&gt; __( 'Edit Agent', 'ee' ),
      'new_item'           =&gt; __( 'New Agent', 'ee' ),
      'all_items'          =&gt; __( 'All Agents', 'ee' ),
      'view_item'          =&gt; __( 'View Agent', 'ee' ),
      'search_items'       =&gt; __( 'Search Agent', 'ee' ),
      'not_found'          =&gt; __( 'No agents found', 'ee' ),
      'not_found_in_trash' =&gt; __( 'No agents found in Trash', 'ee' ),
      'parent_item_colon'  =&gt; '',
              'menu_name'          =&gt; __( 'Agents', 'ee' ),
  );
      $capabilities = array(
          'publish_posts' =&gt; 'publish_agents',
          'edit_posts' =&gt; 'edit_agents',
          'edit_others_posts' =&gt; 'edit_others_agents',
          'delete_posts' =&gt; 'delete_agents',
          'delete_others_posts' =&gt; 'delete_others_agents',
          'read_private_posts' =&gt; 'read_private_agents',
          'edit_post' =&gt; 'edit_agent',
          'delete_post' =&gt; 'delete_agent',
          'read_post' =&gt; 'read_agent'
          );
      register_post_type( 'agent',
      array(
          'labels'        =&gt; $labels,
          'rewrite'       =&gt; array(
          'slug' =&gt; __( 'agents', 'ee' )
              ),
          'hierarchical'  =&gt; true,
          'supports'      =&gt; array( 'title', 'editor', 'thumbnail', 'page-attributes' ),
          'public'        =&gt; true,
          'has_archive'   =&gt; true,
          'menu_position' =&gt; 32,
                      'map_meta_cap'=&gt;true,
                      'capabilities' =&gt; $capabilities,
          'menu_icon'     =&gt; get_template_directory_uri() .'/img/agents.png',
      )
  );
  
  
  }
  
  add_action( 'init', 'agents_create_post_type' );
  
  
  function add_capability() {
      $admins = get_role( 'administrator' );
      $admins-&gt;add_cap( 'publish_agents' ); 
      $admins-&gt;add_cap( 'edit_agents' ); 
      $admins-&gt;add_cap( 'edit_others_agents' ); 
      $admins-&gt;add_cap( 'delete_agents' ); 
      $admins-&gt;add_cap( 'delete_others_agents' ); 
      $admins-&gt;add_cap( 'read_private_agents' ); 
      $admins-&gt;add_cap( 'edit_agent' ); 
      $admins-&gt;add_cap( 'delete_agent' ); 
      $admins-&gt;add_cap( 'read_agent' ); 
  
      $subscriber = get_role( 'subscriber' ); 
      $subscriber-&gt;add_cap( 'edit_agents' ); 
      $subscriber-&gt;add_cap( 'delete_agents' ); 
  
  }
  add_action( 'admin_init', 'add_capability');
  </code></pre>
  
  <p>With that done I got the menu for Subscriber in the panel control to Add and View Agents, but when I list them, even though I have especified permissions for subscriber it seems once the post have been published by admin the links to edit, delete por each post don't appear anymore, i thought with the permissions above would be enough. Any clue would be very grateful!</p>