tutorial
// Register Custom Post Type
function ab_post_types() {
$labels = array(
'name' => _x( 'Tutorials', 'Post Type General Name', 'ab' ),
'singular_name' => _x( 'Tutorial', 'Post Type Singular Name', 'ab' ),
'menu_name' => __( 'Tutorials', 'ab' ),
'name_admin_bar' => __( 'Tutorial', 'ab' ),
'archives' => __( 'Tutorial Archives', 'ab' ),
'attributes' => __( 'Tutorial Attributes', 'ab' ),
'parent_item_colon' => __( 'Parent Tutorial:', 'ab' ),
'all_items' => __( 'All Tutorials', 'ab' ),
'add_new_item' => __( 'Add New Tutorial', 'ab' ),
'add_new' => __( 'Add New', 'ab' ),
'new_item' => __( 'New Tutorial', 'ab' ),
'edit_item' => __( 'Edit Tutorial', 'ab' ),
'update_item' => __( 'Update Tutorial', 'ab' ),
'view_item' => __( 'View Tutorial', 'ab' ),
'view_items' => __( 'View Tutorials', 'ab' ),
'search_items' => __( 'Search Tutorial', 'ab' ),
'not_found' => __( 'Not found', 'ab' ),
'not_found_in_trash' => __( 'Not found in Trash', 'ab' ),
'featured_image' => __( 'Tutorial Image', 'ab' ),
'set_featured_image' => __( 'Set tutorial image', 'ab' ),
'remove_featured_image' => __( 'Remove tutorial image', 'ab' ),
'use_featured_image' => __( 'Use as tutorial image', 'ab' ),
'insert_into_item' => __( 'Insert into tutorial', 'ab' ),
'uploaded_to_this_item' => __( 'Uploaded to this tutorial', 'ab' ),
'items_list' => __( 'Tutorials list', 'ab' ),
'items_list_navigation' => __( 'Tutorials list navigation', 'ab' ),
'filter_items_list' => __( 'Filter tutorials list', 'ab' ),
);
$args = array(
'label' => __( 'Tutorial', 'ab' ),
'description' => __( 'Bass / Music Tutorial', 'ab' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-learn-more',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'tutorial', $args );
}
add_action( 'init', 'ab_post_types', 0 );