Hide "No category" from subcategories
-
Hello, I am using this code
<?php if (is_category()) { $cat = get_query_var('cat'); wp_list_categories('orderby=name&use_desc_for_title=0&depth=1&number=1&hierarchical=1&title_li=<li class=archiveicon>&hide_empty=0&child_of='.$cat); } ?>
to display link on top of categories to archive page that is manualy created and posts are moved manualy there. The concept is I have sub category named Archive under every category and I use this code to display just the first sub category by name. When the archive page is opened tho, I get a text in the place of the archive link – “No category” since there is no sub category in the archive categories.
How can I disable this text ? The text is wrapped like this
<li class="categories"></li> <li class="archiveicon"><ul><li>Няма категории</li></ul></li>
Thanks in advance
Edit: my theme is based on twenty ten if it matters
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide "No category" from subcategories’ is closed to new replies.