Using hierarchical and nonhierarchical custom taxonomies


show more Using hierarchical and nonhierarchical custom taxonomies provides you with in-depth training on Design. Taught by Morten Rand-Hendriksen as part of the Create an Online Portfolio with WordPress show less
please wait ...

Using hierarchical and nonhierarchical custom taxonomies

So far we've created a single custom taxonomy called Meal type that's applied to all three custom post types and this taxonomy is hierarchical. You can see it displays down here as hierarchical => true, and when we go to WordPress Admin, it displays as a regular category. But in WordPress we've two types of taxonomies. We have the hierarchical taxonomies like the categories, or in our case Meal type, and we also have the nonhierarchical ones like tags. Now I want to introduce a nonhierarchical taxonomy.

You would think that the simplest way to do it would be to simply copy our Meal type taxonomy and just paste it in and change the labels and the name. But that nonhierarchical taxonomy is slightly different from the hierarchical one and we have to do it exactly right to make it work. Instead of doing the copy and paste, let's go to the code snippets and copy it from there. You'll see under 04.05 we have the complete stack for the Ingredients taxonomy. So simply cop...

Using hierarchical and nonhierarchical custom taxonomies
Video duration: 5m 54s 3h 13m Advanced

Viewers:

Using hierarchical and nonhierarchical custom taxonomies provides you with in-depth training on Design. Taught by Morten Rand-Hendriksen as part of the Create an Online Portfolio with WordPress

Subjects:
Design Web
Software:
WordPress
Author:
please wait ...