forked from zyml/project-ar2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog-archives.php
More file actions
executable file
·37 lines (25 loc) · 894 Bytes
/
blog-archives.php
File metadata and controls
executable file
·37 lines (25 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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(); ?>