Skip printing categories widget in 404 template if there's only one category

Addresses issue 183 - https://github.com/Automattic/_s/issues/183
This commit is contained in:
Slobodan Manic 2013-03-21 06:42:55 +01:00
parent 84ed9c519d
commit 153c76c92b
1 changed files with 2 additions and 0 deletions

View File

@ -22,12 +22,14 @@ get_header(); ?>
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?> <?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
<?php if ( _s_categorized_blog() ) { // Only print the widget if blog has multiple categories ?>
<div class="widget"> <div class="widget">
<h2 class="widgettitle"><?php _e( 'Most Used Categories', '_s' ); ?></h2> <h2 class="widgettitle"><?php _e( 'Most Used Categories', '_s' ); ?></h2>
<ul> <ul>
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?> <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
</ul> </ul>
</div><!-- .widget --> </div><!-- .widget -->
<?php } // end check for multiple categories ?>
<?php <?php
/* translators: %1$s: smiley */ /* translators: %1$s: smiley */