Support » How-To and Troubleshooting » register_taxonomy()


  • Has anyone used this function?

    I am interested in creating a new taxonomy (extra to tags and categories) and can’t seem to find out how to do this or if it is possible.

    For example I would like to keep the tags taxonomy as a user inputted field and then create an autotags taxonomy that is entirely seperate (and is accessable at http://www.example.com/autotags).


Viewing 5 replies - 1 through 5 (of 5 total)
  • This is actually pretty simple once you know how…

    Just use register_taxonomy( ‘people’, ‘post’, array(‘rewrite’ => array(‘slug’=>’people’)));

    In your templates functions.php to make the template aware of the taxonomy. Then you can use all the taxonomy functions to add/remove/associate posts to terms in the taxonomy (you’ll need to look at wp-includes/taxonomy.php.

    Then if you want to use url variables to do something you have the url http://www.blog.com/people/person and can access the ‘person’ by using


    This allows you to have any number of http://www.blog.com/taxonomy/term type situations.

    Still looking at how to use similar functionality of tags (tag+tag etc) without rewriting all the functions. Still think this should be in wordpress by default – drupal does it really well.


    I was actively searching for a solution to my case, and finally heard about “Taxonomy” thing.
    As I’m not a programmer … but with some knowledge about HTML (maybe it would help -.-°), could be please help in how to use those?

    Your example of “( ‘X’, ‘post’, array(‘rewrite’ => array(‘slug’=>’X’)));” and “get_query_var(‘X’)” insn’t that clear for me.
    Is there anyway you give a clearer example? Or maybe a little tutorial?

    That would be awesome, thank you in advance.

    @martythornley – Yep, that should help.

    Here’s my other article on this:

    Using custom taxonomies to create a movie database

    These both sounded great, but it isn’t working. I have copied them exactly into my functions.php, but the new taxonomies don’t show up anywhere.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘register_taxonomy()’ is closed to new replies.