Add comments template

This commit is contained in:
2018-12-10 22:31:59 +00:00
parent 907f4f4f3e
commit bc0e10dee5
10 changed files with 172 additions and 6 deletions

34
theme/comments.php Normal file
View File

@@ -0,0 +1,34 @@
<div class="comments" id="comments">
<div class="comments__head">
<h2 class="comments__title">
<?php
if (comments_open()) :
if (have_comments()) :
echo 'Join the conversation';
else:
echo 'Leave a comment';
endif;
else:
echo 'Comments are closed';
endif;
?>
</h2>
</div>
<div class="comments__body">
<ol class="comments__list">
<?php
wp_list_comments(
array(
'walker' => new Windycoys_Walker_Comment(),
'style' => 'ol',
)
);
?>
</ol>
</div>
<div class="comments__foot">
<?php comment_form(array(
'class_form' => 'foo-bar'
)) ?>
</div>
</div>