forked from webjyh/presence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
63 lines (52 loc) · 2.49 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
60
61
62
63
<?php get_header(); ?>
<?php
$presence_values = get_option('presence_framework_values');
if ( !is_array( $presence_values ) ) $presence_values = array();
if( array_key_exists( 'Infinite_scrolling' , $presence_values ) && $presence_values['Infinite_scrolling'] == 'on' ){
$wrap = 'id="wrap"';
}
?>
<div class="wrap w-size" <?php echo $wrap; ?>>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1 class="page-title"><?php printf(__('All posts in “%s”', 'presence'), single_cat_title('',false)); ?></h1>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h1 class="page-title"><?php printf(__('All posts tagged “%s”', 'presence'), single_tag_title('',false)); ?></h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1 class="page-title"><?php _e('Archive for ', 'presence') ?> <?php the_time('F jS, Y'); ?></h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1 class="page-title"><?php _e('Archive for ', 'presence') ?> <?php the_time('F, Y'); ?></h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1 class="page-title"><?php _e('Archive for', 'presence') ?> <?php the_time('Y'); ?></h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1 class="page-title"><?php _e('All posts by ', 'presence') ?> <?php echo $curauth->display_name; ?></h1>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1 class="page-title"><?php _e('Blog Archives', 'presence') ?></h1>
<?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$format = get_post_format();
if( false === $format ) { $format = 'standard'; }
?>
<?php get_template_part( 'content', $format ); ?>
<?php endwhile; ?>
<?php
if( array_key_exists( 'Infinite_scrolling' , $presence_values ) && $presence_values['Infinite_scrolling'] == 'on' ){
?>
<div class="navigation" id="navigation"><?php next_posts_link( '' ) ?></div>
<?php
} else {
?>
<div class="m-pager clearfix">
<?php par_pagenavi(9); ?>
</div>
<?php
}
?>
<?php else : ?>
<div class="no-result">
<h1> <?php _e( 'No Results Found', 'presence' ); ?></h1>
<p><?php _e( 'The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.', 'presence' ); ?></p>
</div>
<?php endif; ?>
</div>
<?php get_footer(); ?>