Custom Post Type With Capability

 register_post_type('blog', array(

            'capability_type' => 'blogs',

            'map_meta_cap'    => true,

            'supports' =>  array( 'title', 'editor', 'excerpt' ),

            'reqrite'   => array('slug' => 'blogs'),

            'has_archive' => true,

            'public' => true,

            'labels' => array(

                    'name' => 'Blogs',

                    'add_new_item' => 'Add New Blog',

                    'edit_item'    => 'Edit Blog',

                    'all_items'    => 'All Blogs',

                    'singular_name' => 'Blog'

                ),

        ));

Comments

Popular posts from this blog

Battery discharging formula

HTML CSS JS Animated Sidebar Menu