// Register Custom Post Type function news() { $labels = array( 'name' => 'News', 'singular_name' => 'News', 'menu_name' => 'News', 'name_admin_bar' => 'News', 'archives' => 'News Archives', 'attributes' => 'News Attributes', 'parent_item_colon' => 'Parent News:', 'all_items' => 'All News', 'add_new_item' => 'Add New News', 'add_new' => 'New News', 'new_item' => 'New News', 'edit_item' => 'Edit News', 'update_item' => 'Update News', 'view_item' => 'View News', 'view_items' => 'View News', 'search_items' => 'Search news', 'not_found' => 'No news found', 'not_found_in_trash' => 'No news 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 item', 'uploaded_to_this_item' => 'Uploaded to this item', 'items_list' => 'News list', 'items_list_navigation' => 'News list navigation', 'filter_items_list' => 'Filter news list', ); $rewrite = array( 'slug' => 'news/breaking-news', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => 'News', 'description' => 'News information pages.', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'breaking_news', 'showbiz_news', 'news_categories' ), 'hierarchical' => true, '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' => 'news/breaking-news', 'exclude_from_search' => false, 'publicly_queryable' => true, 'query_var' => 'news', 'rewrite' => $rewrite, 'capability_type' => 'page', 'show_in_rest' => false, ); register_post_type( 'news', $args ); } add_action( 'init', 'news', 0 );