Posted in Images, WordPress Theme Development

WP CUSTOM POST TYPE REGISTER

 // For User Speacific Mange Or Create POST ( BY USER ROLE )
 if (current_user_can('manage_options')) {

 // Register Custom Post Type
 register_post_type( 'service-post', array(
 'labels' => array(
 'name' => 'Services',
 'add_new_item' => 'Add New Service',
 'singular_name' => 'View Services',
 'add_new' => 'Add Service',
 'edit_item' => 'Edit Service',
 'add_new_item' => 'Add New Service',
 ),
 'public' => true,
 'menu_icon' => 'dashicons-welcome-write-blog',
 'menu_position' => 3,
 'supports' => array('title','editor', 'thumbnail','revisions')
 ) 
 );
 }


 // Showing Custom Post