project 4 – inhabitent – post type
inhabitent post type adventure
// Register Custom Post Type function inhabitent_post_type_adventure() { $labels = array( 'name' => 'Adventures', 'singular_name' => 'Adventure', 'menu_name' => 'Adventures', 'name_admin_bar' => 'Adventure', 'archives' => 'Adventure Archives', 'attributes' => 'Adventure Attributes', 'parent_item_colon' => 'Parent Adventure:', 'all_items' => 'All Adventures', 'add_new_item' => 'Add New Adventure', 'add_new' => 'Add New', 'new_item' => 'New Adventure', 'edit_item' => 'Edit Adventure', 'update_item' => 'Update Adventure', 'view_item' => 'View Adventure', 'view_items' => 'View Adventures', 'search_items' => 'Search Adventure', 'not_found' => 'Not found', 'not_found_in_trash' => 'Not found in Trash', 'featured_image' => 'Adventure Image', 'set_featured_image' => 'Set Adventure image', 'remove_featured_image' => 'Remove Adventure image', 'use_featured_image' => 'Use as Adventure image', 'insert_into_item' => 'Insert into Adventure', 'uploaded_to_this_item' => 'Uploaded to this Adventure', 'items_list' => 'Adventures list', 'items_list_navigation' => 'Adventures list navigation', 'filter_items_list' => 'Filter Adventures list', ); $args = array( 'label' => 'Adventure', 'description' => 'A adventure post type for hipster camping', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, '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' => 'post', 'show_in_rest' => true, ); register_post_type( 'adventure', $args ); } add_action( 'init', 'inhabitent_post_type_adventure', 0 );