How to create or register custom taxonomy like categories or tag for custom post type or default post type wordpress
For create a custom taxonomy for your custom post type just copy and paste below code into your theme's functions.php add_action( 'init', 'rj_create_guide_taxonomy', 0 ); function rj_create_guide_taxonomy() { $labels = array( 'name' => _x( 'Categories', 'taxonomy general name' ), 'singular_name' => _x( 'Category', 'taxonomy singular name' ), 'search_items' => __( 'Search Categories' ), 'all_items' => __( 'All Categories' ), 'parent_item' => __( 'Parent Category' ), 'parent_item_colon' => __( 'Parent Category:' ), 'edit_item' => __( 'Edit Category' ), 'update_item' => __( 'Update Category' ), 'add_new_item' => __( 'Add New Category' ), 'new_item_name' => __( 'New Category ...