}
?>
</ul>
- <p>Archive</p>
- <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
- <p>Categories</p>
- <ul>
<?php
$args = array(
'orderby' => 'name',
- 'order' => 'ASC'
+ 'order' => 'ASC',
+ 'exclude' => get_category_by_slug('uncategorized')->term_id
);
- $categories = get_categories($args);
- foreach($categories as $category) {
- echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> '; }
+ $categories = get_categories($args);
+ if (count($categories) > 1) {
+ echo '<p>Categories</p>';
+ echo '<ul>';
+ foreach($categories as $category) {
+ echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';
+ }
+ echo '</ul>';
+ }
?>
- </ul>
+
+ <p>Archive</p>
+ <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
</div>
</div>
\ No newline at end of file