A Post is a Category is a Story

Ever since March 2005 I have pumped out a total of approximately 1500 posts, which equates to 300 posts per year or an average of between 5 and 6 posts per week, grand total of over 500,000 words. Gives me sore fingers just thinking about it!

A post is a story is an article and each one must be associated with one or more categories – think of a category like a news topic, essentially a high level way of classifying the stories you write and publish. I have stuck to the single category per post approach and this works well for me. In addition to categories there are also tags and other “taxonomies” – I ‘m not going to dwell on the last two (tags and taxonomies) as I promised a few posts ago to knock off the nerdy stuff.

(See the bottom of this post for additional technical notes)

Some bloggers are able to establish a classification of their posts easily and up front – perhaps someone running a niche type blog would find this exercise straightforward. In my case the job of classifying what I write about is very much a moving target and has evolved over time alongside the nature of what ends up published. In addition I have gone through a couple of re-classifications and this by no means was or is a trivial task – especially when we are talking about hundreds or even thousands of posts.

Posts here at Trupela Tok have been categorised as per the list below. Note that if you click on a category icon you will be taken to a full list of corresponding posts.

Enough gobli-guke…

[listcaticons] (I no longer use the Category Icons plugin since I wrote this post but the code below should still work for those that are using the plugin)

**** Technical Notes ****

  • The above list was dynamically generated.
  • Easy display of icons is possible thanks to the Category Icons plugin.
  • A shortcode was embedded within this post to generate the list.
  • The PHP code for the function invoked by the shortcode was borrowed from the Category Icons website.
  • Display of PHP code possible courtesy SyntaxHighlighter Evolved.
  • Want to see what other plugins are currently active?
  • Code really is poetry…
add_shortcode('listcaticons', 'rs_caticons_listing');
function rs_caticons_listing() {
 $output = '<ul>';
 foreach(get_categories("orderby=name&order=ASC") as $category) {
 $output .= '<li>';
 $output .= get_cat_icon('class=left&echo=false&small=false&link=false&fit_height=48&fit_width=48&cat='.$category->cat_ID);
 $output .= ' ';
 $output .= '<h3 style="margin-bottom: 0.1cm;">'.$category->cat_name.'&nbsp;&nbsp;<small>('.$category->count.')</small></h3>';
 $output .= $category->description;
 $output .= '<br/><br/>';
 $output .= '</li>';
 $output .= '</ul>';
 return $output;

The Author

4 responses to “A Post is a Category is a Story”

  1. How to display a list of the categories with icons | Category Icons

    […] a shortcode : [caticons_listing], instead of {#caticons_listing}, which results in a simpler code, as suggested by Robert of trupela.com (thanks, Rob !) […]

  2. Márcio Fernandes

    Nice job, thanks!

    How can I list only subcategories of a parent category?

  3. Submarine

    Hi Robert !

    The Category Icons has a little brother now :


    Enjoy & spread the news ! Thank you ! :)