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

by in WordPress

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.

VN:F [1.9.17_1161]
Rating: 0.0/5 (0 votes cast)

Related Tutorials:

  1. Thesis Hack: How to Display Your Full Youtube Channel in Thesis Theme?
  2. How to highlight Author comments with image and background color in Thesis theme?
  3. How to Place Ads Box Before The Post Title in WordPress Thesis Theme?
  4. How to Create Pages and Options Comments Section of WordPress Admin
  5. How to Customize Teaser box in Thesis Theme Homepage

{ 8 comments… read them below or add one }

Jaydip Parikh

Hey Pascal,

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

Reply

Pascal

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

Reply

Harsh Agrawal

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

Reply

Pascal

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

Reply

Alison Moore Smith

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

Reply

Pascal

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

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

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

Reply

Leave a Comment

{ 1 trackback }

Previous post:

Next post:


Popular Tags:

    thesis trackbacks