How to Display Track backs after Comments in WordPress Thesis Theme?

In normal, Trackbacks are shown before the comments appear in thesis theme. Some bloggers block trackbacks from showing them in their blogs. But displaying track backs is a good practice. Because whenever some people see you having more trackbacks, they also want to link back to the article as it worth for their readers.

Can I show Trackbacks after comments?

One of my reader Jaydip asked a below question here.

Thanks for wonderful article. I am still having one request for you. Can we change order of Trackback and Comments.

I mean to say in default thesis you will first find Trackbacks and then Comments. but I would like to have First Comments and then Trackback.

Yes. You can. But not recommended. Because if you have more comments in a particular post, trackbacks will go to very bottom. Readers hardly read there.

But for some reason you might be thinking to do that. So here is the simple tutorial for that. By this simple code move, you can show comments before track backs in your thesis theme.

  1. Go to your wordpress admin dashboard.
  2. Click on ‘Editor’ under ‘Appearances’ tab.
  3. You can see the below code in comments.php
global $thesis;?><div id="comments"><?php

 
if (have_comments()) { // If there is available feedback of any kind.
foreach ($comments as $comment) {
if ($comment->comment_type == 'trackback' || $comment->comment_type == 'pingback')
$linkbacks[] = $comment;
else
$only_comments[] = $comment;
}
if ($linkbacks) {
thesis_comments_intro(count($linkbacks), pings_open(), 'trackbacks');
?>
<dl id="trackback_list">
<?php
foreach ($linkbacks as $comment) {
?>
<dt><?php echo apply_filters('thesis_trackback_link', get_comment_author_link(), $comment); ?></dt>
<dd><?php echo apply_filters('thesis_trackback_datetime', '<span>' . sprintf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()), $comment) . '</span>'; ?></dd>
<?php
}
?>
</dl>
<?php
}

 
// Display comments (how deep does this rabbit hole go?).
if ($only_comments) {
thesis_comments_intro(count($only_comments), comments_open());
?>
<?php thesis_comments_navigation(); ?>
<dl id="comment_list">
<?php
thesis_list_comments();
?>
</dl>
<?php thesis_comments_navigation(2); ?>
<?php }
elseif (comments_open())
thesis_comments_intro(0, comments_open()); }

 

4. Just swap the codes in red and green.
Remember before swapping code, copy and paste the code in comments.php as back up.

So that if you broke something, you can get back yours.

That’s all. Now you can see change, comments first and trackbacks next.

{ 8 comments… add one }

Leave a Comment

  • Jaydip Parikh January 2, 2010, 10:27 AM

    Hey Pascal,

    One more good article. Keep sharing this kind of wonderful information with us.

    Reply
    • Pascal January 2, 2010, 11:03 AM

      welcome jaydip,
      keep on watch our site. we have more thesis tutorial.
      Thanks for your words.

      Reply
  • Harsh Agrawal January 3, 2010, 7:56 AM

    Hey Pascal this is pretty useful as lots of trackback might create an exit point for readers

    Reply
    • Pascal January 3, 2010, 9:33 AM

      Yoru are right harsh. thats why i changed trakback below comments. thanks for your kind words

      Reply
  • Alison Moore Smith February 24, 2010, 5:58 AM

    I’ve tried this repeatedly and every time I get a a parse error on line 44. Any ideas?

    Reply
    • Pascal February 24, 2010, 7:47 AM

      At the time of interchanging the code. you have to copy and paste the code very carefully. if you are miss any character you got error. i will contact you via e-mail.

      Reply
  • Ramin @ Persönlichkeitsentwicklung April 20, 2011, 7:50 PM

    I noticed that when writing a new post, there is no field to enter a trackback URL anymore. (I am using the newest Thesis version and wordpress 3.1.1). Any idea why this is the case? Thanks!

    Reply
  • bhavana menon August 3, 2011, 11:04 PM

    how to enable trackback in thesis
    trackback is not showing in my thesis theme

    Reply