<?php //Custom Post Type :: SLIDING PHOTOS
function custom_post_type_slides() {
    $labels = array(
        'name'                => __('Slides', 'kipya' ),
        'add_new_item'        => __( 'Add New Slide', 'kipya' ),
        'add_new'             => __( 'Add New Slide', 'kipya' ),
        'edit_item'           => __( 'Edit Slide', 'kipya' ),
        'update_item'         => __( 'Update Slide', 'kipya' ),
        'all_items'           => __( 'All Slides', 'kipya' ),
        'search_items'        => __( 'Search Slide', 'kipya' ),
        'singular_name'       => __('Slide'),
    );
    $supports = array(
        'title',        // Post title
        'excerpt',      // Allows short description
        'thumbnail',    // Allows feature images
        //'custom-fields' // Supports by custom fields
    );
    $args = array(
        'labels'              => $labels,
        'description'         => 'Post type for sliding photos', 
        'supports'            => $supports,
        'hierarchical'        => false, 
        'public'              => true,  // Makes the post type public
        'show_ui'             => true,  // Displays an interface for this post type
        'show_in_menu'        => true,  // Displays in the Admin Menu (the left panel)
        'show_in_admin_bar'   => true,  // Displays in the black admin bar
        'menu_position'       => 6,     // The position number in the left menu
        'menu_icon'           => 'dashicons-format-gallery',  
        'can_export'          => true,  // Allows content export using Tools -> Export
        'has_archive'         => true,  // Enables post type archive (by month, date, or year)
        'exclude_from_search' => false, 
        'capability_type'     => 'post' // Allows read, edit, delete like “Post”
    );
    register_post_type('slides', $args);
}
add_action('init', 'custom_post_type_slides');

function kipya_register_slides_cpt() {
    register_post_type('slides',[
        'labels'=>['name'=>'Slides','singular_name'=>'Slide'],
        'public'=>true,
        'supports'=>['title','thumbnail'],
        'menu_icon'=>'dashicons-images-alt2'
    ]);
}
add_action('init','kipya_register_slides_cpt');
