Cases
Custom Post Types to create cases or portfolio.
// Register Custom Post Type function cpt_case() { $labels = array( 'name' => _x( 'Cases', 'Post Type General Name', '_wpb' ), 'singular_name' => _x( 'Case', 'Post Type Singular Name', '_wpb' ), 'menu_name' => __( 'Cases', '_wpb' ), 'name_admin_bar' => __( 'Cases', '_wpb' ), 'archives' => __( 'Case Archives', '_wpb' ), 'attributes' => __( 'Case Attributes', '_wpb' ), 'parent_item_colon' => __( 'Parent Case:', '_wpb' ), 'all_items' => __( 'All Cases', '_wpb' ), 'add_new_item' => __( 'Add New Case', '_wpb' ), 'add_new' => __( 'Add New', '_wpb' ), 'new_item' => __( 'New Case', '_wpb' ), 'edit_item' => __( 'Edit Case', '_wpb' ), 'update_item' => __( 'Update Case', '_wpb' ), 'view_item' => __( 'View Case', '_wpb' ), 'view_items' => __( 'View Cases', '_wpb' ), 'search_items' => __( 'Search Case', '_wpb' ), 'not_found' => __( 'Not found', '_wpb' ), 'not_found_in_trash' => __( 'Not found in Trash', '_wpb' ), 'featured_image' => __( 'Featured Image', '_wpb' ), 'set_featured_image' => __( 'Set featured image', '_wpb' ), 'remove_featured_image' => __( 'Remove featured image', '_wpb' ), 'use_featured_image' => __( 'Use as featured image', '_wpb' ), 'insert_into_item' => __( 'Insert into Case', '_wpb' ), 'uploaded_to_this_item' => __( 'Uploaded to this Case', '_wpb' ), 'items_list' => __( 'Cases list', '_wpb' ), 'items_list_navigation' => __( 'Cases list navigation', '_wpb' ), 'filter_items_list' => __( 'Filter Cases list', '_wpb' ), ); $args = array( 'label' => __( 'Case', '_wpb' ), 'description' => __( 'Cases or portfolio', '_wpb' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', ), 'taxonomies' => array( 'case_category', ' case_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-portfolio', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => 'cases', 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', 'show_in_rest' => true, ); register_post_type( 'case', $args ); } add_action( 'init', 'cpt_case', 0 );