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
<?php

if ( get_query_var('paged') ) {
	$paged = get_query_var('paged');
} else if ( get_query_var('page') ) {
	$paged = get_query_var('page');
} else {
	$paged = 1;
}

query_posts( array(
	'post_type' => 'portfolio',
	'paged' => $paged,
	'posts_per_page' => 12,
	'post_status' => 'publish',
	'order' => 'DESC',
	'orderby' => 'date'
));

while (have_posts()) : the_post();

	if(!get_post_format()) {
		get_template_part('format', 'standard');
	} else {
		get_template_part('format', get_post_format());
	}

	$i++;

endwhile;

?>

<?php northernarmy_content_nav( 'nav-home' ); ?>