1
私は少し問題があります。私のコメントは表示されません、私は私のcomments.php
をチェックしましたが、なぜその理由が表示されませんか?先週はすべてうまくいっていて、突然表示されませんでした。私のコメントは表示されていません
私のコードは私のポストのテンプレートに
<?php
if (post_password_required()) {
return;
}
?>
<div id="comments" class="comments-area">
<?php
if (have_comments()) : ?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
printf('Comments:');
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments(array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 42,
'type' => 'comment'
));
?>
</ol>
<?php endif;?>
<?php
if (! comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')) :
?>
<p class="no-comments"><?php _e('Comments are closed.', 'twentysixteen'); ?></p>
<?php endif; ?>
<?php
comment_form(array(
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h2>',
));
?>
</div>
である私が試した
<?php
get_header(); ?>
<div id="primary" class="content-area main-template-content-post">
<main id="main" class="site-main" role="main">
<?php single_blog_loop();?>
<?php comments_template();?>
</main>
</div>
<?php get_sidebar();?>
<?php get_footer(); ?>
はcomments.php
などがありますが、それはうまくいきませんでした。何か不足していますか?私は答えをgoogledしかし、何も動作するようです。私は今朝からこれに固執している。どのような助けもありがとうございます、事前に感謝します。
'get_header(); ?> 'be' <?php get_header(); ?> '? –
ああ、それはここでそれをコピーすることを忘れてしまった。待ち、病気編集 – codeplus
JSエラーはありますか?そうでなければ、PHPの部分の中でエラーを探す必要があります。 – Marcus