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 have a car database that I want to import into Wordpress as taxonomies. The problem is I can't create 2 taxonomies at once (first is parent, last ones are childs of first).

$p = wp_insert_term("Acura", "classified-category", array("description" => "Acura"));
$c = wp_insert_term("Acura CL", "classified-category", array("parent" => $p["term_id"], "description" => "Acura CL"));


Array ( [term_id] => 13 [term_taxonomy_id] => 4720 ) 
Array ( [term_id] => 2589 [term_taxonomy_id] => 4721 ) 

But in Dashboard appears just parent category. The problem is similar to this one: Create two categories at once (parent > child)

Any idea ?

share|improve this question
up vote 4 down vote accepted

The issue is with the taxonomy cache. You have to clear it after you insert the terms in order to see them. I had the same issue, which someone answered for me here:


Insert that after the term inserts and you should be good.

share|improve this answer
works great! thx! – George Jipa Jul 30 '11 at 16:01
Glad I was able to help out – Manny Fleurmond Jul 30 '11 at 20:38
Awesome. Worked perfectly. – Foxinni Jun 25 '13 at 11:53

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.