Blog Marketing Journal


WordPress Tip: How To Separate WordPress Trackbacks and Comments



I have not seen this WordPress tip in many places, however I think it can be a worthy blogging tip to put into practice. If you receive a lot of trackbacks on your blog you will notice that they get mixed in with the comments. First, a simple definition of a trackback.

[source] A Trackback is one of three types of Linkbacks, methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Some weblog software programs, such as WordPress, Movable Type and Community Server, support automatic pingbacks where all the links in a published article can be pinged when the article is published.

So essentially a trackback is one blog advising another blog that there is a link connecting them and that the link comes from a particular article. The receiving blog pings back and it is that ping back that often ends up in the comments area. You have two choices, delete the trackback or leave it inplace. Trackbacks can be valuable for linking so it is often wise to leave the trackback in. However the trackbacks dotted through your comments make it look a little untidy. Follow these steps and our comments will not only look tidy, they will look professional. Before starting – make a copy of your comments.php file, just in case you make an error.

Step one: Open for editing your comments.php file and locate the following code.

<?php foreach ($comments as $comment) : ?> immediately after this code place this:

<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>

Step two: locate the following piece of code:

<?php endforeach; /* end for each comment */ ?> place this code on the line before:

<?php } /* End of is_comment statement */ ?>

Step three: locate this piece of code:

<?php else : // this is displayed if there are no comments so far ?> immediately before place this code:

<h3>Trackbacks</h3>
<ol>
<?php foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>
<li><?php comment_author_link() ?></li>
<?php } ?>

<?php endforeach; ?>
</ol>

All done. Save the file and go into any post that has a mix of trackbacks and comments. This WordPress tip is easy to put into place and provides a nice neat look to your blog software.

Posted in Blog Software - Tagged blogging software, blogging tip, WordPress tip
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« Where Is Your Blogging Income Coming From – Adsense?
» Blog Marketing Tip: Are you Wasting Your 404?

1 Comment

  1. Martin's Gravatar Martin
    July 30, 2008 at 1:48 pm | Permalink

    Very good web site, great work and thank you for your service.

Recent Posts

  • Beef up your WordPress Blog with Plugins
  • Have you Found Your Blog Writing Style Yet?
  • Write for Humans First and Search Engines Second
  • How Much Thought Do You Put in your Blog Titles?
  • Treat your Blog Like a Business

Categories

  • Blog and Website Services
  • Blog Content
  • Blog Design
  • Blog Directories
  • Blog Marketing
  • Blog Marketing Books
  • Blog Metrics
  • Blog Plugins
  • Blog SEO
  • Blog Software
  • Blogging Income
  • Blogging Tips
  • WordPress tips

Tags

Adsense blog Blog and webservices Blog and Website Services Blog Content blog copywriting Blog Design Blog Directories blog directory blogging Blogging Business Blogging Income blogging software blogging tip Blogging Tips Blog Hosting blog income Blog Marketing blog marketing tips Blog Metrics Blog Metrics Package Blog Metrics Plug in blog plugin Blog Plugins blogs Blog SEO blog services Blog Software blog tip blog tips blog web design blog writing business blog Feedburner google analytics plugin social bookmark Social Bookmarking traffic website hosting website services WordPress word press WordPress tip WordPress tips

RSS Syndication

  • All posts
  • All comments

EvoLve theme by Theme4Press  •  Powered by WordPress Blog Marketing Journal