I am trying to display a list of rubrics using

<?php wp_list_categories('depth=1');?> 

But it displays only one rubric, that is, the first one without a rubric .. The rest is ignored, even add at least save .. does not see. How can all parental headings be displayed normally?

  • Do you need to display all the first level headings? Headings are not empty? Because the parameter hide_empty defaults to 1, that is, empty categories are not displayed. - Ponio

1 answer 1

 <?php wp_list_categories('orderby=name&include=id рубрик&title_li=');? 

orderby (string) You can sort the list by certain criteria. For example, by the number of posts in each category or by category name. There are the following criteria:

  1. ID - sort by ID;
  2. name - sorting by name (by default);
  3. slug - sorting by alt. name (slug);
  4. count - by the number of entries in the category;
  5. term_group - by group.

Default: 'name'

include (string) Lists only the specified categories. Specify category IDs separated by commas.

title_li (string) Sets the title of the list. If you change this parameter to '', then the title will not be displayed at all. Default: 'Categories'