How To Create A Custom Taxonomy On WordPress

Once you have registered your custom taxonomy, it is really useful for be able to list the terms inside of that taxonomy, exactly as you would display a list of post categories.

Even though it is a little misleading, it turns out that you can display a list of terms in a custom taxonomy using the wp_list_categories() function.

The function accepts a variety of parameters, which you can see by going to codex entry, but I will just show you a couple of the most useful and commonly used ones.

This will display all of the terms inside of the “genre” taxonomy as an unordered list. It will also display a post count next to each taxonomy name, each taxonomy will be linked, and it will indent child terms.

Where to Go from Here?

This snippet is great for developers, but it could be take a little further and be placed into a widget that provides users a way to select the taxonomy terms they would like to display from the widget options. If you want to take on this task, check out my “blank widget template“. It will give you just about everything you need to know.