Platform Custom Taxonomy
Platform custom taxonomy to work with Release Notes custom post type.
if ( ! function_exists( 'custom_taxonomy' ) ) { // Register Custom Taxonomy function custom_taxonomy() { $labels = array( 'name' => _x( 'Platforms', 'Taxonomy General Name', 'som-child' ), 'singular_name' => _x( 'Platform', 'Taxonomy Singular Name', 'som-child' ), 'menu_name' => __( 'Platform', 'som-child' ), 'all_items' => __( 'All Platforms', 'som-child' ), 'parent_item' => __( 'Parent Platform', 'som-child' ), 'parent_item_colon' => __( 'Parent Platform:', 'som-child' ), 'new_item_name' => __( 'New Platform Name', 'som-child' ), 'add_new_item' => __( 'Add New Platform', 'som-child' ), 'edit_item' => __( 'Edit Platform', 'som-child' ), 'update_item' => __( 'Update Platform', 'som-child' ), 'view_item' => __( 'View Platform', 'som-child' ), 'separate_items_with_commas' => __( 'Separate platform with commas', 'som-child' ), 'add_or_remove_items' => __( 'Add or remove platforms', 'som-child' ), 'choose_from_most_used' => __( 'Choose from the most used', 'som-child' ), 'popular_items' => __( 'Popular Platforms', 'som-child' ), 'search_items' => __( 'Search Platforms', 'som-child' ), 'not_found' => __( 'Not Found', 'som-child' ), 'no_terms' => __( 'No Platforms', 'som-child' ), 'items_list' => __( 'Platforms list', 'som-child' ), 'items_list_navigation' => __( 'Platforms list navigation', 'som-child' ), ); $rewrite = array( 'slug' => 'release-notes', 'with_front' => false, 'hierarchical' => false, ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => false, 'rewrite' => $rewrite, 'show_in_rest' => true, ); register_taxonomy( 'platform', array( 'release_notes' ), $args ); } add_action( 'init', 'custom_taxonomy', 0 ); }