Custom sidebar category listing?

You can skip categories that have parent in your loop:

foreach($category_list as $category) {

if( '0' != $category->parent )
    continue;

I’ve looked through the source, but it seems depth is only taken in account in wp_list_categories() and you will probably need to extend Walker_Category class to custom walker there to make changes to output.

Actually, this might be a good idea if you need a really complex categories output format.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)