cool-cats: Limit number of categories fetched

We only need to know if there is more than one category so only fetch a
maximum of two categories. The rest of the categories are all gravy.
This commit is contained in:
Mohammad Jangda 2014-03-24 16:46:38 +00:00
parent ad2a2cd9b9
commit 39a256b183
1 changed files with 1 additions and 0 deletions

View File

@ -104,6 +104,7 @@ function _s_categorized_blog() {
$all_the_cool_cats = get_categories( array( $all_the_cool_cats = get_categories( array(
'hide_empty' => 1, 'hide_empty' => 1,
'fields' => 'ids', 'fields' => 'ids',
'number' => 2, // we only need to know if there is more than one category
) ); ) );
// Count the number of categories that are attached to the posts. // Count the number of categories that are attached to the posts.