Title: Problem using list_cats
Last modified: August 18, 2016

---

# Problem using list_cats

 *  [Brak](https://wordpress.org/support/users/brak/)
 * (@brak)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/problem-using-list_cats/)
 * Okay.. I’ve been busy heavily modding a WP install and it seems I’ve run into
   a stupid block.
    I’m working on my archives page. Got montly archives listing
   just dandy.. now down to categories. I’m using the following code: ` <?php  $
   cats = array(1, 2, 7, 9, 10, 11); list_cats(1, 'All', 'name', 'asc', '', 1, 0,
   1, 0, 1, true, 0, $cats, 0);  // list_cats(optionall, 'all', 'sort_column', '
   sort_order', 'file', list, optiondates, optioncount, hide_empty, use_desc_for_title,
   children, child_of, categories, recurse, 'feed', 'feed_image', 'exclude'); ?>
   I have ensured that $cats is returning an interger array (also included function
   list from wiki) and the result I’m getting is this:
    -  All
    -  (0)
    -  (0)
    -  (0)
    -  (0)
    -  (0)
    -  (0)
 * Now, I have posts (some categories are empty). But it’s returning 6 categories…
   seems like _something_ is working, but I don’t know what it is. Since this template
   function is really long I’m posting here to see if I did something wrong (most
   likely). Using a 1.3 nightly from about a week ago.
    Any ideas why it might be
   doing this?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Brak](https://wordpress.org/support/users/brak/)
 * (@brak)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/problem-using-list_cats/#post-83359)
 * No solutions to this problem? =/

Viewing 1 replies (of 1 total)

The topic ‘Problem using list_cats’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Brak](https://wordpress.org/support/users/brak/)
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/problem-using-list_cats/#post-83359)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
