I’m new to WordPress but I would like to know how can one get a custom post type linked to 3 custom taxonomies. I have created a custom post type called “product” and created three custom taxonomies and linked them to the product post type. My aim is to make a product have category, brand and type..which are the three custom taxonomies I have created.
Here is my functions.php
file. My goal is to come up with something like this where “Ved” is the category name, “Stuv” is the brand name, and “Braskaminer” is the type name of the product and lastly “stuv 16 H”, “Hwam 2630” etc. are the respective products. I will really appreciate if I can get some guidance on how I can use WordPress functions to achieve this.
Your argument list for
register_post_type
needs to include:Your custom taxonomies have to be registered first.
Alternately, you can use
register_taxonomy_for_object_type
.Again, your custom taxonomies have to be registered first.