I’m having a lot of trouble getting the following to work properly.
{exp:channel:entries channel="mwblog" limit="1" disable="member_data|pagination|trackbacks"}
<div class="box a">
<h1>{title}</h1>
<div class="meta">by <a href="http://{profile_path=member}">{author}</a> on {entry_date format="%F %j%S, %Y"}</div>
{body}
</div><!--entry-->
{/exp:channel:entries}
<ul id="comments" class="box comments">
<h3>{total_comments} Comments <a href="#add-commentid=right">Add yours</a></h3>
<p> {exp:comment:entries channel="mwblog"}<br />
<li class="comment"><br />
<a href="http://{permalink}class=count">{count}</a><br />
{comment}<br />
by {url_or_email_as_author} on {comment_date format="%F %j%S, %Y at %g:%i%a"}<br />
</li><!--comment--><br />
{/exp:comment:entries}<br />
</ul>The problem I’m having is that {total_comments} is showing the total comments for the entire site, not just the specific entry. Moving {total_comments} inside {exp:comment:entries} works, but that <h3> ends up getting repeated for every single comment.
{comment_total} works if I move ul#comments inside the {exp:channel:entries}. However, that makes {count} show the id for the entry instead of the ids for the comments.
I’m also looking for a conditional that will hide ul#comments when there are zero comments on an entry. I tried using {if total_comments > 0}{/if}, but that seems to hide ul#comments in all cases.
Thanks for any help.