Avoid empty result category queries. Props andy. fixes #3416

git-svn-id: https://develop.svn.wordpress.org/trunk@4580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-12-01 18:55:27 +00:00
parent 893c5fa38e
commit 7b8f7aedc1
2 changed files with 8 additions and 4 deletions

View File

@@ -238,7 +238,10 @@ function wp_list_categories($args = '') {
$output .= __("No categories");
} else {
global $wp_query;
$r['current_category'] = $wp_query->get_queried_object_id();
if ( is_category() )
$r['current_category'] = $wp_query->get_queried_object_id();
if ( $hierarchical )
$depth = 0; // Walk the full depth.
else