WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use a certain defined tree of taxonomies like this:

  • news
  • stories
    • travel
    • people
    • nature
  • videos

but I want to have this hierarchy set in the code and not created via admin interface. The user should only be able to add new posts linking them to the correct taxonomy.

I have found documentation about how to register a taxonomy which allows children, but not about how to define a full tree.

Is it possible? If so, how?

share|improve this question

The children are terms. First register your taxonomies (news, stories, videos), then register travel, people, and nature as terms under stories.

Like so: http://codex.wordpress.org/Function_Reference/wp_insert_term

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.