-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-thread.php
More file actions
49 lines (37 loc) · 852 Bytes
/
single-thread.php
File metadata and controls
49 lines (37 loc) · 852 Bytes
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
<?php
get_header();
while (have_posts()): the_post();
?>
<article>
<header>
<?php
$subtitle = get_post_meta(get_the_ID(), 'subtitle', true);
$comments_count = get_comment_count(get_the_ID())['approved'];
if (empty($subtitle)):
?>
<h1><?= get_the_title() ?></h1>
<?php else: ?>
<hgroup>
<h1><?= get_the_title() ?></h1>
<p><?= $subtitle ?></p>
</hgroup>
<?php endif; ?>
<div>
<div>
<span>#thread started by</span>
<div class="author"><?= author() ?></div>
</div>
<h2 class="arrow-down">
<a href="#comments">
<?= $comments_count ?> <?= $comments_count === 1 ? 'response' : 'responses' ?>
</a>
</h2>
</div>
</header>
<section id="content"><?= get_the_content() ?></section>
<?php comments_template('/comments-thread.php'); ?>
</article>
<?php
endwhile;
get_footer();
?>