Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (25 sloc) 0.894 kb
<?php
/*
* Template Name: Blog Archives
*/
?>
<?php get_header(); ?>
<div id="content" class="section" role="main">
<?php ar2_above_content() ?>
<?php
$posts_per_page = get_option( 'posts_per_page' );
$paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1; // use 'page' since this is a page template.
$wp_query = new WP_Query( array ( 'paged' => $paged, 'posts_per_page' => $posts_per_page ) );
?>
<?php if ( $wp_query->have_posts() ) : ?>
<h1 class="archive-title"><?php _e( 'Blog Archives', 'ar2' ) ?></h1>
<div id="archive-posts">
<?php ar2_render_posts( null, array ( 'type' => ar2_get_theme_option( 'archive_display' ) ), true ) ?>
</div><!-- #archive-posts -->
<?php else: ?>
<?php ar2_post_notfound() ?>
<?php endif; ?>
<?php ar2_below_content() ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Jump to Line
Something went wrong with that request. Please try again.