forked from themebeans/charmed-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-portfolio.php
65 lines (46 loc) · 1.24 KB
/
archive-portfolio.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* The template for displaying portfolio archives
*
* Used to display archive-type pages for portfolio posts.
* If you'd like to further customize these taxonomy views, you may create a
* new template file for each specific one.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package Charmed Pro
* @link https://themebeans.com/themes/charmed-pro
*/
get_header(); ?>
<div class="bricks">
<?php
$portfolio_posts_count = get_theme_mod( 'portfolio_posts_count' );
$paged = 1;
if ( get_query_var( 'paged' ) ) {
$paged = get_query_var( 'paged' );
}
if ( get_query_var( 'page' ) ) {
$paged = get_query_var( 'page' );
}
do_action( 'charmed_before_portfolio' );
$args = array(
'post_type' => 'portfolio',
'paged' => $paged,
'posts_per_page' => $portfolio_posts_count,
);
$wp_query = new WP_Query( apply_filters( 'charmed_portfolio_args', $args ) );
if ( $wp_query->have_posts() ) :
while ( $wp_query->have_posts() ) :
$wp_query->the_post();
get_template_part( 'template-parts/portfolio-loop' );
endwhile;
endif;
wp_reset_postdata();
do_action( 'charmed_after_portfolio' );
?>
<div id="page_nav">
<?php next_posts_link(); ?>
</div>
</div>
<?php
get_footer();