Combined Comments and Trackbacks

ExpressionEngine allows you the option to show both your comments and any trackbacks you have received in an integrated display. If you aren't interested in this feature, then simply continue using the comment tag like normal.

If you wish to have both your comments and trackbacks combined into a single display then you need to make some modifications to the comment tag. The short explanation is that within the comment tag you'll have two sets of displays, one for comments and one for trackbacks. These sets will be enclosed in the appropriate conditional:

{exp:comment:entries}

{if comments}
{comment}

<div class="posted">Posted by {url_or_email_as_author} on {comment_date format='%m/%d'} at {comment_date format='%h:%i %A'}</div>
{/if}


{if trackbacks}
<strong>{title}</strong>

{content}

<div class="posted">Tracked on: <a href="{trackback_url}">{weblog_name}</a> ({trackback_ip}) at {trackback_date format="%Y %m %d %H:%i:%s"}</div>
{/if}

{/exp:comment:entries}

Variables

{if comments}

The variables available inside of this tag are the same as the regular variables available inside the comment tag.

{if trackbacks}

The variables available inside of this tag are the same as the regular variables available inside the trackback tag.

Displaying Combined Comments and Trackbacks Count

You may use the standard {comment_tb_total} variable inside the {exp:weblog:entries} tag to display a combined total of comments and trackbacks.