我的新主题有一个问题
my website is about Education 教师和学生。每个帖子都属于一位老师,学生可以通过评论与她/他交谈<现在,我想在任何帖子中添加一个特别的东西。我想在一篇文章中使用pills (引导)。其中,学生可以ask their questions 但在另一方面,他们可以do review and rating.事实上,我需要为每个人使用不同的comments\\u模板文件。
but the problem is: 通过在一篇文章中添加两个comments\\u模板,每个评论也将显示在另一部分中。但我只想展示它的一部分(避孕药)。
你能帮我解决这个问题吗<我真的需要它。谢谢你的朋友们
UPDATE:
例如,我将这些代码添加到single.php
要有2个comment_template()
. 一个用于讨论,另一个用于给老师评分。但当我在一个部分发表评论时,它也会在另一个部分显示出来。我想用不同的comment_tamplate()
对于avery部分:
<div class="row container-fluid profile_nazar" style=" margin: 0 5% 30px 5% !important; margin-bottom: 20px; border: 1px solid #ddd; box-shadow: 0 0 6px #ccc;">
<ul class="nav-pills profile_pills">
<li><a data-toggle="pill" href="#pill1">Talk</a></li>
<li><a data-toggle="pill" href="#pill2">Rate</a></li>
</ul>
<div style="width:100%; height:400px; overflow-y: scroll;">
<div class="tab-content">
<div id="pill1" class="tab-pane fade in active" style="margin: 20px;">
<?php comments_template(); ?>
</div>
<div id="pill2" class="tab-pane fade" style="margin: 20px;">
<?php comments_template(); ?>
</div>
</div>
</div>
</div>