Slider Post Type (Basic)
Slider post type, used for generating bootstrap sliders on the theme
// Register Custom Post Type function mme_register_slider_posttype() { $labels = array( 'name' => _x( 'Slides', 'Post Type General Name', 'mme' ), 'singular_name' => _x( 'Slide', 'Post Type Singular Name', 'mme' ), 'menu_name' => __( 'Slides', 'mme' ), 'parent_item_colon' => __( 'Parent Slide:', 'mme' ), 'all_items' => __( 'All Slides', 'mme' ), 'view_item' => __( 'View Slide', 'mme' ), 'add_new_item' => __( 'Add New Slide', 'mme' ), 'add_new' => __( 'Add New', 'mme' ), 'edit_item' => __( 'Edit Slide', 'mme' ), 'update_item' => __( 'Update Slide', 'mme' ), 'search_items' => __( 'Search Slide', 'mme' ), 'not_found' => __( 'Not slides found', 'mme' ), 'not_found_in_trash' => __( 'Not slides found in Trash', 'mme' ), ); $args = array( 'label' => __( 'slider', 'mme' ), 'description' => __( 'Slides for home page', 'mme' ), 'labels' => $labels, 'supports' => array( 'title', 'excerpt', 'thumbnail', 'revisions', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-images-alt2', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'slider', $args ); } // Hook into the 'init' action add_action( 'init', 'mme_register_slider_posttype', 0 );