WordPress.org

Support

Support » Plugins and Hacks » wp insert/create category doesnt refresh hierarchy

wp insert/create category doesnt refresh hierarchy

  • 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • i think, i find a bug. actually someone found before me 🙂

    http://core.trac.wordpress.org/ticket/13609

    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.

    WebTechGlobal
    Participant

    @webtechglobal

    Yes I get this when mass creating categories.

    Right now I also have an issue with wp insert category not being defined.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp insert/create category doesnt refresh hierarchy’ is closed to new replies.