请问该如何操作才能显示评论?我的​page.php文件代码如下:

<?php get_header(); ?>
<section class="uazoh7-section">
<div class="container">
<div class="row">
<?php
if(isset($smof_data['blog_sidebar_pos'])) {
if($smof_data['blog_sidebar_pos']=='0') {
echo '<div class="col-lg-12">';
if (have_posts()) : while (have_posts()) : the_post(); the_content();endwhile;endif; uazoh_navigation();
echo '</div>';
}elseif($smof_data['blog_sidebar_pos']=='2') {
echo '<div class="col-lg-9">';
if (have_posts()) : while (have_posts()) : the_post(); the_content();endwhile;endif; uazoh_navigation();
echo '</div><div class="col-lg-3">';
if(isset($smof_data['blog_sidebar'])) {dynamic_sidebar(''.$smof_data['blog_sidebar'].''); }else {dynamic_sidebar('sidebar'); }
echo '</div>';
}elseif($smof_data['blog_sidebar_pos']=='1') {
echo '<div class="col-lg-3">';
if(isset($smof_data['blog_sidebar'])) {dynamic_sidebar(''.$smof_data['blog_sidebar'].''); }else {dynamic_sidebar('sidebar'); }
echo '</div><div class="col-lg-9">';
if (have_posts()) : while (have_posts()) : the_post(); the_content();endwhile;endif; uazoh_navigation();
echo '</div>';
}} ?>
</div></div></section>
<?php get_footer(); ?>

蓝山帝景
浏览 153回答 1
1回答

largeQ

你这个没有看到你添加评论函数,自然就没有文章评论喽。在倒数第二行的上面添加以下代码,<?phpif (function_exists('wp_list_comments')) {comments_template('', true);} else {comments_template();}?>应该就可以了。希望帮到你了。
打开App,查看更多内容
随时随地看视频慕课网APP