Monday, May 21, 2007

WordPress - separating Trackbacks and Pings from normal comments

I have not been getting Trackbacks and Pings mixed in with my comments for some time now and thought it might be nice to sort that out once and for all in my theme. A starting point was provided by, but was not looking exactly as ordered as I wanted it to be. I prefer the Trackbacks and Pings to be summaries and the actual comments to be complete. Here is the results (see my Linux courses page for example of resulting Comments, Trackbacks and Pings):

# edit your themes comments.php file and
# look for the starting points I have provided.
<!-- You can start editing here. -->

</code><h3 id="trackbacks">Trackbacks/Pings</h3>
<ul class="commentlist">

<li class="">smaller">
by  —  @ <a href="

comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>


<h3 id="comments">Comments</h3>
<ol class="commentlist">

<li class="">" id="comment-">

comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>

<p class="commentmetadata">
<a href=" edit.g?
20%20%20%20%20%20%20%20%20%20%20%20%20?%3E" title=""> at </a> </p>

I hope this helps you to sort out something for your own site with regards to Comments, Trackbacks and Pings. ;-)