// Register Custom Post Type function custom_post_type_rent() { $labels = array( 'name' => 'Rents', 'singular_name' => 'Rent', 'menu_name' => 'Post Types', 'name_admin_bar' => '', 'archives' => '', 'attributes' => '', 'parent_item_colon' => '', 'all_items' => '', 'add_new_item' => 'Add New Item', 'add_new' => 'Add New', 'new_item' => 'New Item', 'edit_item' => 'Edit Item', 'update_item' => 'Update Item', 'view_item' => 'View Item', 'view_items' => 'View Items', 'search_items' => 'Search Item', 'not_found' => '', 'not_found_in_trash' => '', 'featured_image' => '', 'set_featured_image' => '', 'remove_featured_image' => '', 'use_featured_image' => '', 'insert_into_item' => '', 'uploaded_to_this_item' => '', 'items_list' => '', 'items_list_navigation' => '', 'filter_items_list' => 'Filter items list', ); $rewrite = array( 'slug' => 'rent', 'with_front' => true, 'pages' => true, 'feeds' => false, ); $args = array( 'label' => 'Rent', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-location-alt', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'query_var' => 'rent', 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'twentytwenty_rent', $args ); } add_action( 'init', 'custom_post_type_rent', 0 );