I'm using Custom Post Type and "Members" plugin in wordpress.
My problem is that in my custom post type I can't delete posts, the link to move to trash is not there :(
Here is my code:
'capabilities' => array(
'edit_post' => 'edit_entrada_tallers_activitats_grups',
'read_post' => 'read_entrada_tallers_activitats_grups',
'delete_post' => 'delete_entrada_tallers_activitats_grups',
'delete_posts' => 'delete_entradas_tallers_activitats_grups',
'delete_others_posts' => 'delete_others_entradas_tallers_activitats_grups',
'delete_published_posts' => 'delete_published_entradas_tallers_activitats_grups',
'edit_posts' => 'edit_entrada_tallers_activitats_grups',
'edit_others_posts' => 'edit_others_entrada_tallers_activitats_grups',
'publish_posts' => 'publish_entrada_tallers_activitats_grups',
'read_private_posts' => 'read_private_entrada_tallers_activitats_grups',
'create_posts' => 'edit_create_entrada_tallers_activitats_grups',
In the Edit Capabilities page plugin it appear and I have checked the checkbox of:
- delete_entradas_tallers_activitats_grups (delete_posts)
- delete_others_entradas_tallers_activitats_grups (delete_others_posts)
- delete_published_entradas_tallers_activitats_grups (delete_published_posts)
But not "delete_entrada_tallers_activitats_grups" ( the delete_post) maybe this is the problem but I don0t know how to fix it....
UPDATE full code
function my_custom_post_tallers_grup() {
$labels = array(
'name' => _x( 'Aquí t’escoltem', 'post type general name' ),
'singular_name' => _x( 'Taller i activitat per a grups', 'post type singular name' ),
'add_new' => _x( 'Afegeix', 'oferta' ),
'add_new_item' => __( 'Afegeix nova entrada' ),
'edit_item' => __( 'Editar' ),
'new_item' => __( 'Nova entrada' ),
'all_items' => __( 'Totes les entrades' ),
'view_item' => __( 'Veure entrada' ),
'search_items' => __( 'Cercar entrades' ),
'not_found' => __( 'No s\'ha trobat.' ),
'not_found_in_trash' => __( 'No s\'ha trobat a la paperera' ),
'parent_item_colon' => '',
'menu_name' => 'Aquí t’escoltem'
);
$args = array(
'labels' => $labels,
'description' => 'Entrades d\'aqui t'escoltem',
'publicly_queryable' => true,
'exclude_from_search' => false,
'show_ui' => true,
'public' => true,
'query_var' => true,
'menu_position' => 3,
'rewrite' => array( 'slug' => 'tallers-i-activitats-per-a-grups', 'with_front' => false ),
'supports' => array( 'title', 'editor', 'sticky', 'thumbnail' ),
'has_archive' => true,
'capability_type' => 'post',
'hierarchical' => false,
'capabilities' => array(
'edit_post' => 'edit_entrada_tallers_activitats_grups',
'read_post' => 'read_entrada_tallers_activitats_grups',
'delete_post' => 'delete_entrada_tallers_activitats_grups',
'delete_posts' => 'delete_entradas_tallers_activitats_grups',
'delete_others_posts' => 'delete_others_entradas_tallers_activitats_grups',
'delete_published_posts' => 'delete_published_entradas_tallers_activitats_grups',
'edit_posts' => 'edit_entrada_tallers_activitats_grups',
'edit_others_posts' => 'edit_others_entrada_tallers_activitats_grups',
'publish_posts' => 'publish_entrada_tallers_activitats_grups',
'read_private_posts' => 'read_private_entrada_tallers_activitats_grups',
'create_posts' => 'edit_create_entrada_tallers_activitats_grups',
)
);
register_post_type( 'tallers_grup', $args );
register_taxonomy_for_object_type( 'category', 'tallers_grup' );
}
add_action( 'init', 'my_custom_post_tallers_grup' );
I have found some error in your code so I rewrite your full code.
Note: You can translate it on your on Language