Custom Taxonomies For Pages?
-
add_action( 'init', 'create_my_taxonomies', 0 ); function create_my_taxonomies() { register_taxonomy( 'genres', 'page', array( 'hierarchical' => false, 'rewrite' => array('slug'=>'genre'), 'query_var' => 'genre' ) ); register_taxonomy( 'themes', 'page', array( 'hierarchical' => false, 'rewrite' => array('slug'=>'theme'), 'query_var' => 'theme' ) ); }
What’s wrong with that code?
If I change ‘page’ to ‘post’ then it works and shows up on the Add New Post page but that’s not what I want to use it for. I need them for pages and I thought custom taxonomies were supposed to work with pages.I’d like category-like boxes for Genres and Themes, but I guess I could settle on tag-like boxes if I had to.
Anyone know what’s up?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Taxonomies For Pages?’ is closed to new replies.