wordpress custom post type disable add new

Solutions on MaxInterview for wordpress custom post type disable add new by the best coders in the world

showing results for - "wordpress custom post type disable add new"
Elsie
11 Jul 2016
1register_post_type( 'custom_post_type_name', array(
2  'capability_type' => 'post',
3  'capabilities' => array(
4    'create_posts' => false, // Removes support for the "Add New" function ( use 'do_not_allow' instead of false for multisite set ups )
5  ),
6  'map_meta_cap' => true, // Set to `false`, if users are not allowed to edit/delete existing posts
7));
8
similar questions
queries leading to this page
wordpress custom post type disable add new