You appear to be a bot. Output may be restricted
Description
Find out if blog has more than one category.
Usage
$bool = twentyfourteen_categorized_blog();
Parameters
Returns
bool true if blog has more than 1 category
Source
File name: twentyfourteen/inc/template-tags.php
Lines:
1 to 24 of 24
function twentyfourteen_categorized_blog() { $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ); if ( false === $all_the_cool_cats ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'twentyfourteen_category_count', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 || is_preview() ) { // This blog has more than 1 category so twentyfourteen_categorized_blog() should return true. return true; } else { // This blog has only 1 category so twentyfourteen_categorized_blog() should return false. return false; } }