Colors
CPT Colors
// Register Custom Post Type function custom_color_type() { $labels = array( 'name' => _x( 'Colors', 'Post Type General Name', 'shstgs' ), 'singular_name' => _x( 'Color', 'Post Type Singular Name', 'shstgs' ), 'menu_name' => __( 'Colors', 'shstgs' ), 'name_admin_bar' => __( 'Color', 'shstgs' ), 'archives' => __( 'Color Archives', 'shstgs' ), 'attributes' => __( 'Color Attributes', 'shstgs' ), 'parent_item_colon' => __( 'Parent Color:', 'shstgs' ), 'all_items' => __( 'All colors', 'shstgs' ), 'add_new_item' => __( 'Add New Color', 'shstgs' ), 'add_new' => __( 'Add New', 'shstgs' ), 'new_item' => __( 'New color', 'shstgs' ), 'edit_item' => __( 'Edit color', 'shstgs' ), 'update_item' => __( 'Update color', 'shstgs' ), 'view_item' => __( 'View color', 'shstgs' ), 'view_items' => __( 'View colors', 'shstgs' ), 'search_items' => __( 'Search color', 'shstgs' ), 'not_found' => __( 'Not found', 'shstgs' ), 'not_found_in_trash' => __( 'Not found in Trash', 'shstgs' ), 'featured_image' => __( 'Featured Image', 'shstgs' ), 'set_featured_image' => __( 'Set featured image', 'shstgs' ), 'remove_featured_image' => __( 'Remove featured image', 'shstgs' ), 'use_featured_image' => __( 'Use as featured image', 'shstgs' ), 'insert_into_item' => __( 'Insert into color', 'shstgs' ), 'uploaded_to_this_item' => __( 'Uploaded to this color', 'shstgs' ), 'items_list' => __( 'Colors list', 'shstgs' ), 'items_list_navigation' => __( 'Colors list navigation', 'shstgs' ), 'filter_items_list' => __( 'Filter colors list', 'shstgs' ), ); $args = array( 'label' => __( 'Color', 'shstgs' ), 'description' => __( 'Registred color', 'shstgs' ), 'labels' => $labels, 'supports' => array( 'title', 'editor' ), 'taxonomies' => array( 'shading', 'tints' ), 'hierarchical' => false, 'public' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-customizer', 'show_in_admin_bar' => false, 'show_in_nav_menus' => false, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'capability_type' => 'page', 'show_in_rest' => true, ); register_post_type( 'color', $args ); } add_action( 'init', 'custom_color_type', 0 );