Do I have to set parent when set post term?

When you create a term for a hierarchical taxonomy, if you don’t specify a parent, its parent ID is set to 0. In other words, it becomes a parent term.


Edited with regards to comments:

  • Add specifically each term you wish to add to the post (parent terms aren’t automatically added if their children are).
  • Adding terms to posts does not effect the terms relationship with each other (i.e.. child-parent relationship remains in tact).

error code: 523