wp_insert_term – parent & child problem

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:

delete_option("classified-category_children");

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

Leave a Comment