The degree of one's emotions varies inversely with one's knowledge of the facts: the less you know the hotter you get. —Bertrand Russell

HOWTO Include Technorati Tags in the Byline of Your WordPress Posts

Posted by Justin under Technoblogging View recent posts with the tag Technoblogging on Technorati WordPress View recent posts with the tag WordPress on Technorati 

You may have noticed that I’ve made some changes to the byline and meta line of my posts, so they link to related Technorati tags. This makes it easier for people using Technorati to find my posts when they’re looking for information on a certain topic that I’ve addressed (such as Intelligent Design).

There are several ways to do this, but most of them create Technorati tags in a separte paragraph at the end of the post, which isn’t really where they belong. Here’s how to get them in the byline.

First, you’ll want to get the great WordPress plugin Bunny’s Technorati Tags. By default, this plugin creates a separate paragraph for the tags. However, since Technorati tags are a type of metadata, I think they should go in the closing byline with the other metadata, such as the link to the comments and so forth. So, find the line at the end of the plugin file (bunny-tags.php) that looks like this:
function the_bunny_tags($before = '

Tags: ‘, $after = ‘

‘, $separator = ‘, ‘)
and change it to this:
function the_bunny_tags($before = '', $after = ' | ', $separator = ' | ')

You can of course use something else to separate the tags; just make sure you remove the

tag and its closer.

Next, we have to edit the post section of your template. Mine looks like this:
| « Previous | Next »

3 Responses to “HOWTO Include Technorati Tags in the Byline of Your WordPress Posts”


Justin,

I tried the Bunny-Tags plugin, but it wasn’t working happily, so I figured I’d start tweaking. I liked the simplicity of your earlier hack and wanted to stick to that. I really wanted to retain the Technorati Tag link as well as the category link, but without repeating the tag list. Inspired/Built upon your earlier hack, here’s what I came up with:

” title=”Search Technorati for links to this post”>Inbound links
| Tags:
category_nicename . ‘”
title=”Search Technorati for posts tagged ‘ . $cat->cat_name . ‘”>

cat_ID . ‘”
title=”More posts from the ‘ . $cat->cat_name . ‘ category”>’ . $cat->cat_name . ‘
| ‘; } ?>

You can substitute your code block for this one to display the post metadata, and you’ll get a new line with the Technorati logo shown once for each category name - the logo is a link to search that tag on Technorati, but the text is still a link to the category on your own blog. Note you’ll need to adjust the path to the Technorati logo image as well as the link to the category if your blog is not in /wordpress/ on your install. The displayed line includes inlinks and comments, but I’ve nice-ified the reporting of the comment count. Just add css rules and you’re done.

Sorry I can’t give you a link to my working example right now, as it’s on a blog design that isn’t public yet… should be coming soon though.

Thanks for the inspiration here.

btw, while we’re on the subject of WordPress hacks, do you have one that will provide an RSS feed for a category? After that, I may also need a recent-comment plugin that will omit specified categories… this would enable the setting of a special category that is for all intents and purposes hidden, but you could still call up its content with a direct link to it or by using the RSS feed. This would basically give WordPress the ability to do a full-featured “blog-within-a-blog”. (i.e., it could be a simple link blog but it’d have comments, trackback, an RSS feed, …and it’d all be in the same control panel) There is a plugin already available to hide categories and suppress their display from feeds, but the recent-comment plugins ignore that one. Any ideas there?

1

Leave a Reply

You can track future comments on this post via this RSS feed. You can trackback this post by pinging this URL. Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Shrink comment box | Expand comment box



Get RC Via Email



Put Obama at 1600 PA Ave

Obama fundraising meter

    Tagegories

    Browse by category:

    Explore by tag:

    Recent Posts

  • Blogroll

  • Archives


    Use the calendar below to find posts by day (mouseover a day on the calendar to see all posts from that day). If you're looking for a specific post, it's much faster to use the search box above.

    October 2005
    S M T W T F S
    « Sep   Nov »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  

      Recent Comments


      Creative Commons License
      We aren't very into all that copyright stuff. Creative Commons licenses are better, so RC is licensed under this one.
      Quote Radical Congruency at will. Inbound links are appreciated, and required for direct quotations.