forked from designwall/dw-wallpress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
42 lines (30 loc) · 1.01 KB
/
home.php
File metadata and controls
42 lines (30 loc) · 1.01 KB
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
38
39
40
41
42
<?php
get_header();
if ( dw_wall_get_theme_option('cat_select') ) {
$cat_arr = dw_wall_get_theme_option('cat_select');
if ($cat_arr[0] != '-1') {
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$wp_query = new WP_Query( 'cat='.implode(',', $cat_arr).'&paged=' . $paged );
}
}
?>
<div id="container" class="clearfix">
<div id="content" class="masonry">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="navigation">
<?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'dw-wallpress' ) ); ?>
<?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'dw-wallpress' ) ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
<!-- #content -->
</div>
<!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>