-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.php
66 lines (40 loc) · 1.8 KB
/
index.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
66
<?php get_header(); ?>
<div class="content">
<?php if (have_posts()) : ?>
<div class="posts">
<?php
$total_post_count = wp_count_posts();
$published_post_count = $total_post_count->publish;
$total_pages = ceil( $published_post_count / $posts_per_page );
$paging_header = '';
$writer_header = ( get_query_var('writer')) ? 'Written By: ' . urldecode(get_query_var('writer')) : '';
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ( $paged > "1" ) {
$paging_header = '(Page '. $paged . ' of ' . $wp_query->max_num_pages . ')';
}
?>
<?php if ( $writer_header OR $paging_header ) : ?>
<div class="page-title section light-padding show-writer">
<div class="section-inner archive-header">
<h1 class="archive-title">
<?php echo $writer_header . ' ' . $paging_header;?>
</h1>
</div>
</div>
<?php endif?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php get_template_part( 'content', get_post_format() ); ?>
</div> <!-- /post -->
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="archive-nav">
<?php echo get_next_posts_link( '« ' . __('Older Writings', 'radcliffe')); ?>
<?php echo get_previous_posts_link( __('Newer Writings', 'radcliffe') . ' »'); ?>
<div class="clear"></div>
</div> <!-- /post-nav archive-nav -->
<?php endif; ?>
<?php endif; ?>
</div> <!-- /posts -->
</div> <!-- /content section-inner -->
<?php get_footer(); ?>