WordPress.org

Support

Support » Plugins and Hacks » Category children stop display by list_cats()

Category children stop display by list_cats()

  • list_cats() reads category children even if you set children=0. I changed list_cats() to not request children from database when children=0.

    Add:
    ‘ $get_children = ”;
    if(!$children)
    {
    $get_children = ‘ and category_parent=0’;
    }’

    Change:
    ‘ WHERE cat_ID > 0 $exclusions
    to:
    WHERE cat_ID > 0 $exclusions $get_children’

  • The topic ‘Category children stop display by list_cats()’ is closed to new replies.