I believe you have a problem with the arrays you’re passing to register_taxonomy
. You have:
register_taxonomy(
'book-cats',
array( 'books' ),
array(
'hierarchical' => false,
'label' => __( 'Book Categories', 'sp-theme' ),
'singular_label' => __( 'Book Category', 'xxr' ),
'query_var' => true
)
);
It should be something like…
register_taxonomy(
'book_cats',
array( 'books' ),
array(
'hierarchical' => false,
'labels' = array(
'name' => _x( 'Book Categories', 'taxonomy general name' ),
'singular_name' => _x( 'Book Category', 'taxonomy singular name' ),
/* etc. */
),
'query_var' => true
)
);
Note that…
- Your taxonomy name has an underscore rather than a hyphen
- ‘labels’ is passed as an array rather than individual elements