Is there a way to use the register_taxonomy function to create child taxonomies to a specific parent taxonomy in a hierarchical structure?

For example: Let’s say I’m creating a theme for selling cars where users can activate it and it automatically creates a hierarchical taxonomy called “Make”. Is there any way to have it automatically create a few different vehicle “make” taxonomies, say Toyota, Lexus, etc.?

1 Answer
1

I think you mean you want to create terms in your taxonomy?

Have a look at this answer for detecting when a theme is activated.

Then use wp_insert_term to insert the terms into your taxonomy.

Leave a Reply

Your email address will not be published. Required fields are marked *