- My site has about 400 Posts (Custom Post Type “dir_listing”)
- Two custom hierarchical taxonomies (“listing_categories” and “listing_regions”) are available to associate with the above Post type
- I currently have 203 “listing_category” Terms, and 154 “listing_region” Terms
- When adding/editing a “dir_listing” Post in WordPress, I checkmark 3 Parent-Level “listing_categories” Terms…
- … and I also checkmark 1-3 Child-Terms for each Parent Term
- After I click “Publish”, WordPress shows the correct Parent Terms and Child-Terms checkmarked.
- If I run a MySQL query on the ‘term_relationships’ table to see which term_taxonomy_ids are associated with the aforementioned Post ID, several of the Child-Term IDs are incremented by 1.
For example, if I set the Post to be associated with Child-Term IDs 385 and 397, the term_relationships table shows the Post associated with 386 & 398.
Things I have checked:
- The WordPress trac, forums and Google
- Inspecting each “listing_category” taxonomy checkbox’s HTML (i.e. I have confirmed that the name and value of each DOES correctly correspond with the desired Term ID)
Happenings which may have affected this?
- A number of the “listing_category” terms have been shuffled around. (e.g. A Parent term has become a Child term, or vice-versa, or a Child term has been moved to another Parent.)
- Both Parent & Child Terms have been renamed without making any changes to the “dir_listing” Post types.
- A number of Parent Terms and Child Terms may have been deleted by another Admin-level user.
This also seems to happen with Child-Terms of the “listing_regions” taxonomy.
I am at my wits’ end trying to understand why this is happening & resolve it, so anyone who takes the time to reply with thoughts/insights/suggestions/questions/gripes, you have my sincere thanks in advance! (And will likely receive incessant “Thank You”s afterward too.)
edit: This thread was renamed from “Taxonomy gets Child-Term relations wrong in DB [Bug?]” since (I think) I came up with a better title for it. Sorry for any confusion.
- The topic ‘Custom Post Type gets wrong Custom Taxonomy Term IDs [Bug?]’ is closed to new replies.