• 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)
  • 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.

    (1)
    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 ?

    (2)
    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”

    (3)
    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.

    Thread Starter wperic

    (@wperic)

    Thanks, paulwpxp. I think I also just got an additional insight, after carefully re-reading https://www.wphub.com/tutorials/understanding-taxonomies-wordpress/.

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

    • 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.