Create terms when registering taxonomy?

I’m registering taxonomy in my functions.php file:

register_taxonomy("our_gallery_types", array("gallery"), array("hierarchical" => true, "label" => "Categories", "singular_label" => "Category", "rewrite" => true));

And it works perfectly.

Read More

But I want also to automatically create two terms in this taxonomy, how would i do that?

When you run WordPress for the very first time and click Posts there is “Uncategorized” category. I want to do exactly the same for my taxonomy, so my users won’t get confused and won’t have to create categories for their own.

How do i achieve that?

Related posts

Leave a Reply

1 comment