wp_options table value

The only really interesting (and very important) part of the 3rd query is this:

'project_location_children', 'a:7:{i:22;a:1:{i:0;i:23;}...etc...}}'

The a:n:{i:n; etc } stuff is a serialized PHP array.

WordPress – for some historical reason – keeps track of term children in one option entry per taxonomy term. The painful thing is, that a lot of people don’t know or forget about this. And if you forget about this, then the only chance to actually notice this behavior is when you look at the taxonomy term list in the admin UI. There you will see missing parent/child relationships – if you look close.

Rule of thumb:

When manually importing legacy or third party data into WordPress and when mapping it to taxonomies do not forget to set and/or update this option entry!

Else the sky will fall on your head.

Leave a Comment