WordPress.org

Ready to get started?Download WordPress

Forums

Category children stop display by list_cats() (1 post)

  1. peterx
    Member
    Posted 8 years ago #

    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'

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.