Services CPT
A custom post type to manage services
if ( ! function_exists('reg_cpt_tf_services') ) { // Register Custom Post Type function reg_cpt_tf_services() { $labels = array( 'name' => 'Services', 'singular_name' => 'Service', 'menu_name' => 'Services', 'name_admin_bar' => 'Services', 'archives' => 'Services Archives', 'attributes' => 'Service Attributes', 'parent_item_colon' => 'Parent Service:', 'all_items' => 'All Services', 'add_new_item' => 'Add New Service', 'add_new' => 'Add New', 'new_item' => 'New Service', 'edit_item' => 'Edit Service', 'update_item' => 'Update Service', 'view_item' => 'View Service', 'view_items' => 'View Services', 'search_items' => 'Search Services', 'not_found' => 'No Services Found', 'not_found_in_trash' => 'Not found in Trash', 'featured_image' => 'Featured Image', 'set_featured_image' => 'Set featured image', 'remove_featured_image' => 'Remove featured image', 'use_featured_image' => 'Use as featured image', 'insert_into_item' => 'Insert into service', 'uploaded_to_this_item' => 'Uploaded to this service', 'items_list' => 'Services list', 'items_list_navigation' => 'Services list navigation', 'filter_items_list' => 'Filter services list', ); $rewrite = array( 'slug' => 'project', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => 'Service', 'description' => 'Represents services of a company/organization', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-clipboard', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => 'all-projects', 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', 'show_in_rest' => true, ); register_post_type( 'tf_services', $args ); } add_action( 'init', 'reg_cpt_tf_services', 0 ); }