How to create a tree of categories from a custom taxonomy

Scenario: You’ve created a custom taxonomy – a custom category type – probably for your own custom post type. And now you want to list those categories nicely in a tree. Sure, you could use a plugin, but if you’re coding this into a theme or your own plugin then you need to use PHP. […]