-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-loop.php
65 lines (46 loc) · 1.6 KB
/
post-loop.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 part for displaying content
*
* @package Lunar
* @since Lunar 1.0
*/
?>
<section class="entry-content">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<?php the_title( sprintf( '<h2 class="entry-title-article"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
</header>
<figure class="featured-img-container">
<?php if (has_post_thumbnail()) { the_post_thumbnail(); } ?>
</figure>
<div class="excerpt-content">
<?php do_action( 'lunar_excerpt_inloop' ); ?>
</div>
<div class="meta-foot">
<?php do_action( 'lunar_metafooter_short' ); ?>
</div>
</article>
<?php
endwhile;
else : ?>
<div class="post-content">
<?php echo esc_url( home_url('/') ); ?>
</div>
<?php
endif; ?>
<nav>
<?php
// Previous/next page navigation.
the_posts_pagination(
array(
'prev_text' => esc_html__( 'Previous page', 'lunar' ),
'next_text' => esc_html__( 'Next page', 'lunar' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'lunar' ) . ' </span>',
)
);
?>
</nav>
</section>