/archive.php
PHP | 41 lines | 28 code | 13 blank | 0 comment | 5 complexity | 08d27e07f305198a0232c4bd8975f97a MD5 | raw file
- <?php get_header(); ?>
- <section class="content" role="main">
- <?php if ( have_posts() ) : ?>
- <h1 class="archive-title"><?php
- if ( is_day() ) :
- printf( __( 'Daily Archives: %s' ), '<span>' . get_the_date() . '</span>' );
- elseif ( is_month() ) :
- printf( __( 'Monthly Archives: %s' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' );
- elseif ( is_year() ) :
- printf( __( 'Yearly Archives: %s' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' );
- elseif ( is_category() ) :
- printf( __( 'Category Archives: %s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
- elseif ( is_tag() ) :
- printf( __( 'Tag Archives: %s' ), '<span>' . single_tag_title( '', false ) . '</span>' );
- else :
- _e( 'Archives' );
- endif;
- ?></h1>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'content', get_post_format() ); ?>
- <?php endwhile; else : ?>
- <h2>There are no posts available</h2>
- <?php get_search_form(); ?>
- <?php endif; ?>
- <?php yab_pagination(); ?>
- </section>
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>