first commit
This commit is contained in:
34
comments.php
Normal file
34
comments.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
function my_custom_comment_format($comment, $args, $depth)
|
||||
{
|
||||
$GLOBALS['comment'] = $comment; ?>
|
||||
|
||||
<article class="comment">
|
||||
<h2><?php echo get_avatar($comment, 48); ?><?php comment_author(); ?>
|
||||
</h2>
|
||||
<br>
|
||||
<h3><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?></h3>
|
||||
<?php comment_text(); ?>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
<?php if (have_comments()): ?>
|
||||
<?php
|
||||
wp_list_comments(array(
|
||||
'callback' => 'my_custom_comment_format',
|
||||
));
|
||||
?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')): ?>
|
||||
<p class="no-comments"><?php esc_html_e('Comments are closed.', 'your-theme'); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user