[wp-trac] [WordPress Trac] #32993: get_terms with child_of only works with uninterrupted hierarchies
WordPress Trac
noreply at wordpress.org
Thu Oct 1 21:00:26 UTC 2015
#32993: get_terms with child_of only works with uninterrupted hierarchies
--------------------------+------------------------------
Reporter: eclev91 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by majemedia):
I have a workaround that just worked for me.
I had to delete an option from the DB before my `child_of` search worked.
Option Name: {taxonomy_name}_children
`delete_option( {taxonomy_name}_children )`
Then my `child_of` search worked wonderfully as described.
My situation:
- Importing thousands of categories in multiple taxonomies.
- Searching through those to assign posts, map terms from multiple
taxonomies together (using WP as a tagging engine)
- `child_of` wasn't working no matter what I did and did not describe in
the args
- deleted the option for all the taxonomies I am working with and it
started working for grandchildren as described in the code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32993#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list