Support » Themes and Templates » Need more on when and why to use custom taxonomy

  • I’m finding lots of stuff on how to set up custom taxonomies but I’m left wondering when and why I would actually want to use one. Again, there are “examples” of custom taxonomies. But I guess the question I have is this: why not just use a new top-level category and build your taxonomy below that? In what kinds of situations does this not work or is it not the best choice?

    The only specific answer I’ve found to this question claims that one might need more than two levels. But I think I’ve experimented and been able to develop at least four levels of category hierarchy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • paulwpxp


    Font hero

    For most projects, I think so, yes the default is more than enough.

    I see few reasons people register custom tax and custom content type. First it’s for pretty url, and second it’s for convenience when edit the content and it’s easier to target when register custom metabox.

    Say, if you are building a movie review site, would you want mymovsite/category/actress/jane-doe or mymovsite/actress/jane-doe as an archive link for movie with that actress ?

    Also, you would want a blog post seperated from the main content itself, a photographer would want to go into the WP’s admin and click “add portfolio” rather than to add “post” and tag it with “portfolio”

    For content that needs custom metabox, it’s a lot easier to target content type rather than checking if that post is in this category or has that tag or if this page is a subpage of that page.

    Thanks, paulwpxp. I think I also just got an additional insight, after carefully re-reading

    Maybe the simplest way to put it is this:
    (4) Use custom taxonomies to avoid repetitive sub-contents.
    So instead of

    • Asian
      • breakfast
      • dinner
        • fish
        • chicken
      • snack
    • Italian
      • breakfast
      • dinner

    (assuming the whole site is Recipes):
    one taxonomy for ‘nationality’
    one taxonomy for ‘meal type’
    one taxonomy for ‘main meat’.

    This could be used with a custom search plugin to find the posts that are Asian and dinner and fish.

    Or is there an easier way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need more on when and why to use custom taxonomy’ is closed to new replies.