Comment RSS and Trackback Links Added

I added links just below the comment box for a trackback link and for the comment RSS feed. This feature was missing from this theme.

In case you’re wondering about how it was done, here are the technical details. First, I went to the Presentation|Theme Editor screen and then opened the Comment template. Next, I scrolled down to the bottom where the “if you delete this” warning comment is found. Then, I entered the following PHP code:

<?php endif; // if you delete this the sky will fall on your head ?>
<?php if ($post-> comment_status == "open" && $post->ping_status == "open") { ?>
<p><a href="<?php trackback_url(display); ?>">Trackback this post</a>  |  <?php comments_rss_link('Subscribe to the comments via RSS Feed'); ?></p>
<?php } elseif ($post-> comment_status == "open") {?>
<p><?php comments_rss_link('Subscribe to the comments via RSS Feed'); ?></p>
<?php } elseif ($post->ping_status == "open") {?>
<p><a href="<?php trackback_url(display); ?>">Trackback this post</a></p>
<?php } ?>

And that was it.

Let me know if you have any questions or comments on this. While I am a programmer I’m not an expert in PHP or WordPress but if you have a question I’ll try my best to answer or point you in the right direction. If you’re an expert in PHP and notice a problem I missed, I would appreciate you letting me know.


RSS feed | Trackback URI


Comment by DamionKutaeff
2008-03-22 15:19:10

Hello everybody, my name is Damion, and I’m glad to join your conmunity,
and wish to assit as far as possible.

2008-03-25 06:32:11

This is very good information which I’ll be able to apply to my sites. I’m still confused about RSS feeds and the like.

* Phyllis *

Comment by YouTube Vidoes!
2008-08-10 12:01:43

Thanks for the informative post.. and thanks for adding our comment to the blog. I am subscribing to your feed so I don’t miss the next post!

shhhh… really really quite. I’m trying to sneak in a bad neighborhood link on this blog. Don’t you think my spam comment is convincing? Aren’t I soooo sneaky!

Name (required)
E-mail (required - never shown publicly)
A Link To Your Site
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment. Comments with links are automatically moderated but are normally allowed after review. New commentators are automatically moderated. You may use anchored text in your signature link as long as your comment is meaningful and on topic. Signature links inside of the comment body are not allowed.


Some graphics Copyright 2005 Riverdeep Interactive Learning Limited, and its licensors. All rights reserved
Some graphics Copyright 2005 Cosmi Corporation, and its licensors. All rights reserved.
All graphics are intended for viewing purposes only.

Directory of General Blogs Personal blogs Top Blogs Marketing SEO blogs Webfeed (RSS/ATOM/RDF) registered at BRDTracker blog directory