-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloop-post.php
67 lines (50 loc) · 2.39 KB
/
loop-post.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
67
<?php
/**
* This template displays the post loop.
*
* @package Natural Lite
* @since Natural Lite 1.0
*/
?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1 class="headline"><?php the_title(); ?></h1>
<div class="post-author">
<p class="align-left"><i class="fas fa-calendar"></i> <?php esc_html_e("Posted on", 'natural-lite'); ?> <?php the_time( esc_html__("F j, Y", 'natural-lite')); ?> <?php esc_html_e("by", 'natural-lite'); ?> <?php esc_url ( the_author_posts_link() ); ?></p>
<p class="align-right"><i class="fas fa-comments"></i> <a class="scroll" href="<?php the_permalink(); ?>#comments"><?php comments_number( esc_html__("Leave a Comment", 'natural-lite'), esc_html__("1 Comment", 'natural-lite'), '% Comments'); ?></a></p>
</div>
<?php if ( has_post_thumbnail() ) { ?>
<div class="feature-img"><?php the_post_thumbnail( 'featured-large' ); ?></div>
<?php } ?>
<!-- BEGIN .article -->
<div class="article">
<?php the_content(); ?>
<?php wp_link_pages(array(
'before' => '<p class="page-links"><span class="link-label">' . esc_html__('Pages:', 'natural-lite') . '</span>',
'after' => '</p>',
'link_before' => '<span>',
'link_after' => '</span>',
'next_or_number' => 'next_and_number',
'nextpagelink' => esc_html__('Next', 'natural-lite'),
'previouspagelink' => esc_html__('Previous', 'natural-lite'),
'pagelink' => '%',
'echo' => 1 )
); ?>
<?php edit_post_link( esc_html__("(Edit)", 'natural-lite'), '', ''); ?>
<!-- BEGIN .post-meta -->
<div class="post-meta radius-full">
<p><i class="fas fa-bars"></i> <?php esc_html_e("Category:", 'natural-lite'); ?> <?php the_category(', '); ?> <?php $tag_list = get_the_tag_list( esc_html__( ", ", 'natural-lite' ) ); if ( ! empty( $tag_list ) ) { ?> <i class="fas fa-tags"></i> <?php esc_html_e("Tags:", 'natural-lite'); ?> <?php the_tags(''); } ?></p>
<!-- END .post-meta -->
</div>
<!-- BEGIN .post-navigation -->
<div class="post-navigation">
<div class="previous-post"><?php previous_post_link('← %link'); ?></div>
<div class="next-post"><?php next_post_link('%link →'); ?></div>
<!-- END .post-navigation -->
</div>
<?php if ( comments_open() || '0' != get_comments_number() ) comments_template(); ?>
<div class="clear"></div>
<?php endwhile; else: ?>
<p><?php esc_html_e("Sorry, no posts matched your criteria.", 'natural-lite'); ?></p>
<?php endif; ?>
<!-- END .article -->
</div>