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