Support » Fixing WordPress » 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)
  • Maybe you’d like to take a look in that topic:

    I am facing the same problem =/

    If it makes you feel any better i have the same problem when trying to create taxonomies for pages a little while back.

    Unfortunately i’ve not had a real need for page taxonomies, so i’ve not looked at why for more then a few minutes..

    Might be worth checking Trac to see if there’s any outstanding bugs for the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Taxonomies For Pages?’ is closed to new replies.