• Resolved tjsherrill

    (@tjsherrill)


    I have gone through the docs about listing categories, and I think my issue is ignorance based.

    What I am currently doing is: <?php wp_list_cats(‘hide_empty=0’);?>

    This shows all including uncategorized and one other one that I don’t want to show. Is it possible to hide_empty=0, exclude=4,1 ?

    thanks so much

Viewing 4 replies - 1 through 4 (of 4 total)
  • You may have answered your own question.

    <?php wp_list_cats('hide_empty=0&exclude=4,1');?>

    Just remember to always put an ampersand between parameters.

    FYI, you can also change the “uncategorized” name to anything and that will still be your catch-all.

    wp_list_cats is deprecated so consider using the template tag, wp_list_categories(). It also has an exclude and a hide_empty argument.

    Thread Starter tjsherrill

    (@tjsherrill)

    thanks to both of you for the responses. Trying to learn this stuff. Just didn’t know to include the &… SOLVED.

    How did I not catch that _cats instead of _categories! Ooops!
    Good catch MichaelH.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘show all categories (even if no posts exist) except 2’ is closed to new replies.