That’s how you resister taxonomy. This will add author as taxonomy
<?php
/**
* @uses Register Book Author Taxonomy
* @uses Adds query vars
* @author Nirpendra Patel
* @return void
**/
function reg_tax_author() {
$authors = array(
'name' => _x( 'Authors', 'Taxonomy plural name', 'b_thebookstore' ),
'singular_name' => _x( 'Author', 'Taxonomy singular name', 'b_thebookstore' ),
'search_items' => __( 'Search Authors', 'b_thebookstore' ),
'popular_items' => __( 'Popular Authors', 'b_thebookstore' ),
'all_items' => __( 'All Authors', 'b_thebookstore' ),
'parent_item' => __( 'Parent Author', 'b_thebookstore' ),
'parent_item_colon' => __( 'Parent Author:', 'b_thebookstore' ),
'edit_item' => __( 'Edit Author', 'b_thebookstore' ),
'update_item' => __( 'Update Author', 'b_thebookstore' ),
'add_new_item' => __( 'Add New Author', 'b_thebookstore' ),
'new_item_name' => __( 'New Author Name', 'b_thebookstore' ),
'add_or_remove_items' => __( 'Add or remove Authors', 'b_thebookstore' ),
'choose_from_most_used' => __( 'Choose from most used Authors', 'b_thebookstore' ),
'menu_name' => __( 'Authors', 'b_thebookstore' ),
);
$args = array(
'labels' => $authors,
'public' => true,
'show_in_nav_menus' => true,
'show_admin_column' => true,
'hierarchical' => true,
'show_tagcloud' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'query_var' => true,
'capabilities' => array(),
);
register_taxonomy( 'author', array( 'post' ), $args );
}
add_action( 'init', 'reg_tax_author' );
?>
here in
register_taxonomy( 'author', array( 'post' ), $args );
change ‘post’ to whatever custom post type or let it be as it is to use taxonomy on posts. That’s all you need to register it. Put all in your functions.php