WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. peterx
    Member
    Posted 11 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.