• Hi, I want to make a navigation that will use only the parent categories and show even the categories that does not have any posts associated with.

    Here is my code:

    <ul id="nav-main">
      <?php wp_list_categories('title_li=&hide_empty=0$depth=1'); ?>
    </ul>

    I successfully remove the “Categories” label with the “title_li” argument, then I’m showing the empty categories with “hide_empty=0”. The thing that doesn’t work is the “depth” argument. Here it says that setting to 1 will get me only the top level categories, but it does not work. Any help?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘The argument “depth” doesn’t work in my navigation’ is closed to new replies.