web/wp-content/themes/twentyeleven/category.php
changeset 194 32102edaa81b
equal deleted inserted replaced
193:2f6f6f7551ca 194:32102edaa81b
       
     1 <?php
       
     2 /**
       
     3  * The template for displaying Category Archive pages.
       
     4  *
       
     5  * @package WordPress
       
     6  * @subpackage Twenty_Eleven
       
     7  * @since Twenty Eleven 1.0
       
     8  */
       
     9 
       
    10 get_header(); ?>
       
    11 
       
    12 		<section id="primary">
       
    13 			<div id="content" role="main">
       
    14 
       
    15 			<?php if ( have_posts() ) : ?>
       
    16 
       
    17 				<header class="page-header">
       
    18 					<h1 class="page-title"><?php
       
    19 						printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
       
    20 					?></h1>
       
    21 
       
    22 					<?php
       
    23 						$category_description = category_description();
       
    24 						if ( ! empty( $category_description ) )
       
    25 							echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
       
    26 					?>
       
    27 				</header>
       
    28 
       
    29 				<?php twentyeleven_content_nav( 'nav-above' ); ?>
       
    30 
       
    31 				<?php /* Start the Loop */ ?>
       
    32 				<?php while ( have_posts() ) : the_post(); ?>
       
    33 
       
    34 					<?php
       
    35 						/* Include the Post-Format-specific template for the content.
       
    36 						 * If you want to overload this in a child theme then include a file
       
    37 						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
       
    38 						 */
       
    39 						get_template_part( 'content', get_post_format() );
       
    40 					?>
       
    41 
       
    42 				<?php endwhile; ?>
       
    43 
       
    44 				<?php twentyeleven_content_nav( 'nav-below' ); ?>
       
    45 
       
    46 			<?php else : ?>
       
    47 
       
    48 				<article id="post-0" class="post no-results not-found">
       
    49 					<header class="entry-header">
       
    50 						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
       
    51 					</header><!-- .entry-header -->
       
    52 
       
    53 					<div class="entry-content">
       
    54 						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
       
    55 						<?php get_search_form(); ?>
       
    56 					</div><!-- .entry-content -->
       
    57 				</article><!-- #post-0 -->
       
    58 
       
    59 			<?php endif; ?>
       
    60 
       
    61 			</div><!-- #content -->
       
    62 		</section><!-- #primary -->
       
    63 
       
    64 <?php get_sidebar(); ?>
       
    65 <?php get_footer(); ?>