forked from davidperel/layerswp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-blog.php
36 lines (30 loc) · 846 Bytes
/
template-blog.php
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
<?php
/**
* Template Name: Blog
* The template for displaying post archives
*
* @package Layers
* @since Layers 1.0.0
*/
get_header(); ?>
<?php get_template_part( 'partials/header' , 'page-title' ); ?>
<section <?php post_class( 'content-main archive clearfix' ); ?>>
<?php get_sidebar( 'left' ); ?>
<?php
$args = array(
"post_type" => "post",
"paged" => $paged
);
$wp_query = new WP_Query($args);
if( $wp_query->have_posts() ) : ?>
<div <?php layers_center_column_class(); ?>>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post();
global $post; ?>
<?php get_template_part( 'partials/content' , 'list' ); ?>
<?php endwhile; // while has_post(); ?>
<?php the_posts_pagination(); ?>
</div>
<?php endif; // if has_post() ?>
<?php get_sidebar( 'right' ); ?>
</section>
<?php get_footer();