/** * Prints HTML with meta information for the current post-date/time and author. */ function sugarspice_post_meta() { /* translators: used between list items, there is a space after the comma */ $category_list = get_the_category_list(__(', ', 'sugarspice')); /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list('', __(', ', 'sugarspice')); if (!sugarspice_categorized_blog()) { // This blog only has 1 category so we just need to worry about tags in the meta text if ('' != $tag_list) { $meta_text = __('This entry was tagged %2$s.', 'sugarspice'); } } else { // But this blog has loads of categories so we should probably display them here if ('' != $tag_list) { $meta_text = __('This entry was posted in %1$s and tagged %2$s.', 'sugarspice'); } else { $meta_text = __('This entry was posted in %1$s.', 'sugarspice'); } } // end check for categories on this blog printf($meta_text, $category_list, $tag_list); }
<div class="page-content"> <p><?php _e('It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'sugarspice'); ?> </p> <?php get_search_form(); ?> <?php the_widget('WP_Widget_Recent_Posts'); ?> <?php if (sugarspice_categorized_blog()) { // Only show the widget if site has multiple categories. ?> <div class="widget widget_categories"> <h2 class="widgettitle"><?php _e('Most Used Categories', 'sugarspice'); ?> </h2> <ul> <?php wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10)); ?> </ul> </div><!-- .widget --> <?php }