-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive.php
59 lines (40 loc) · 1.36 KB
/
archive.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
<?php
/**
*
* The archive file serves as the template for category/tag/taxonomy archives.
*
* @since 1.0
* @package WeFoster Framework
*/
?>
<?php get_template_part( 'header' ); ?>
<div id="main-content" class="main <?php do_action( 'wf_class_main' ); ?>" role="main">
<?php
//Use to Load to Archive Title. see lib/actions.php
do_action( 'wf_before_archive_content' );
?>
<?php do_action( 'wf_before_archive_loop' ); ?>
<?php do_action( 'wf_before_loop' ); ?>
<?php if ( ! have_posts() ) : ?>
<div class="alert alert-warning">
<?php _e( 'Sorry, no results were found.', 'wefoster' ); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php do_action( 'wf_before_loop_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'templates/loops/content', get_post_type() ); ?>
<?php endwhile; ?>
<?php do_action( 'wf_after_loop_content' ); ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="post-nav">
<ul class="pager">
<li class="previous"><?php next_posts_link( __( '← Older posts', 'wefoster' ) ); ?></li>
<li class="next"><?php previous_posts_link( __( 'Newer posts →', 'wefoster' ) ); ?></li>
</ul>
</nav>
<?php endif; ?>
<?php do_action( 'wf_after_loop' ); ?>
</div><!-- /.main -->
<?php get_template_part( 'sidebar' ); ?>
<?php get_template_part( 'footer' ); ?>