diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 5ac10fd8b..8a0220d58 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1543,10 +1543,12 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde if (intval($optiondates) == 1) { $link .= ' '.$category->lastday.'/'.$category->lastmonth; } - if ($list) { - echo "\t
  • $link
  • \n"; - } else { - echo "\t$link
    \n"; + if (!$hide_empty || $category_posts[$category->cat_ID]) { + if ($list) { + echo "\t
  • $link
  • \n"; + } else { + echo "\t$link
    \n"; + } } } }