Home > Blogging

WordPress: adding “Edit This” link, recent comments

Sunday, November 23rd, 2008 | Blogging |

From way back before I began blogging I believed that every post should have an Edit This link. Blame it on Dave Winer. Reducing the pain of editing your mistakes and expanding your thoughts makes for a better blog.

I finally got my wish the other day with a little Googling. Just add this code to your Single Post, Archives, and Main Index Template. You have to be logged in as an administrator to see the link.

<?php edit_post_link(’Edit This’, ‘optionaltextbeforelink’,'optionaltextafterlink’); ?>

I found a new recent comments plug-in that has the behavior I wanted. The Get Recent Comments plug-inhas an option for everything. You can make the output as simple or as complicated as you want. I made it simple: don’t show trackbacks and pings, don’t show commentor’s names, show the subject name, group by subject, and show the number of comments. Bingo.

Here are the settings I used:

Template for the post: <li><strong><a href=”%post_link” title=”%post_title was posted on %post_date”>%post_title</a>&nbsp;<a href=”#” title=”There are %post_counter comments to this posting”>(%post_counter comments)</a></strong><ul>

Template for the comments: (empty)

Template for the closing tags of the post template: </ul></li>

No comments yet.

Leave a comment

Search

A Word from Our Sponsors

Archives

Subscription Options


RSS Posts Feed
RSS Comment Feed

Subscribe in Bloglines
Powered by FeedBurner
Add to Google Reader or Homepage
Add to My AOL
Subscribe in NewsGator Online
Subscribe in Rojo


Email delivery of new posts:

Delivered by FeedBurner