hackwordpress.com

Found a great website for hacking up your WordPress blog.

I found it by doing a search on how to separate my trackbacks from user comments in my comment section.

Nothing sucks more than trying to read what other users have to say in comment sections (especially on popular articles) and I have to skip through all the trackbacks. It really interrupts the conversation - but, we still all love those incoming links.

Unfortunately, there are no plugins yet that do this automatically for you, or at least none that I have seen. You will actually have to get into your blog’s php code and add a few lines. It’s super easy. Just follow the step-by-step instructions shown on the site.

My suggestion is to make sure you back up your comments.php file by copying and pasting the original code into a text file. Then if you do something wrong, simply paste that old code back into the file.

I did change one thing, though. Instead of having all my trackbacks appear above my “Submit Comment” textarea, I made them appear below it so as to keep it easy for readers to comment.

In other words, I added this code here:

<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>

Just above this line here:

<?php endif; // If registration required and not logged in ?>

If you want to give it a try and need my help, send me an email or comment here. If you want to see what it looks like, link to this post and see where your link appears.

Share And Enjoy
    del.icio.us Digg StumbleUpon Technorati Subscribe