diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index dd1dc1d1b2..8193e3e9a8 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -415,7 +415,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde } function in_category($category) { // Check if the current post is in the given category - global $category_cache; + global $category_cache, $post; if ( isset( $category_cache[$post->ID][$category] ) ) return true; @@ -423,4 +423,4 @@ function in_category($category) { // Check if the current post is in the given c return false; } -?> \ No newline at end of file +?>