-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.php
54 lines (38 loc) · 1.04 KB
/
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
<article <?php post_class(); ?>>
<header class="mbt-entry-header">
<?php if (is_single()): ?>
<div class="mbt-entry-header__title">
<h2><?php the_title(); ?></h2>
</div>
<?php else: ?>
<div class="mbt-entry-header__title">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php endif; ?>
<div class="mbt-entry-header__meta">
<p class="post-meta__body">
By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?>
</p>
</div>
</header><!-- .mt-entry-header -->
<div class="mbt-entry-content">
<?php
if(has_post_thumbnail()): the_post_thumbnail(); endif;
if(is_single()):
the_content();
else:
the_excerpt(); endif;
?>
</div>
<?php if(!is_single()):?>
<div class="comment-count">
<p>
<img src="<?php echo get_template_directory_uri() . "/img/comment.png"?>">
<span class="comment-count__text">
Comments (<?php echo get_comments_number(); ?>)
</span>
</p>
</div>
<?php endif; ?>
</article>
<hr class="section-divider">