asdasd77
Member
Posted 1 year ago #
i am coding a script. and its adding categories wp_create_category or wp_insert_category. but on the homepage i cannot view category hierarchy.
i searched database, and find a value in the options table called category_children. it is not affecting from wp insert/create category funcitons. if i was update manually, it works great. but there is a lot of category. is there any solution for this?
asdasd77
Member
Posted 1 year ago #
i think, i find a bug. actually someone found before me :)
http://core.trac.wordpress.org/ticket/13609
chefobat
Member
Posted 11 months ago #
I know it is an old topic put i have faced the same problem. Following the bug and the bug referenced there the fix that worked out for me was to comment out these 2 lines in
function _get_term_hierarchy at line 2642 in wp-includes/taxonomy.php
// if ( is_array($children) )
// return $children;
You have to comment them once, refresh the category page in the admin and then remove the comment in the code.
That is it.
Yes I get this when mass creating categories.
Right now I also have an issue with wp insert category not being defined.