-
Notifications
You must be signed in to change notification settings - Fork 0
/
post-content.php
58 lines (40 loc) · 1.72 KB
/
post-content.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
<section class="entry-content">
<?php if ( have_posts() ) : ?>
<div aria-labelledby="posts" class="lunar-content">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>
itemscope itemtype="https://schema.org/Article">
<header class="article-heading">
<h2><?php the_title(); ?></h2>
</header>
<?php if (has_post_thumbnail()) { ?>
<figure class="featured-img-container">
<?php the_post_thumbnail(); ?>
<figcaption>
<?php echo esc_html( wp_get_attachment_caption( get_post_thumbnail_id() ) ); ?>
</figcaption>
</figure>
<?php
} ?>
<div class="inner-article-content">
<?php the_content( ); ?>
<p><?php
wp_link_pages( array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'lunar' ) . '</span>',
'after' => '</div>',
) ); ?></p>
</div>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
} ?>
</article>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="post-content">
<?php echo esc_url( home_url('/') ); ?>
</div>
<?php endif; ?>
</section>