Archive for October 9th, 2007

Commuting Cleverly

Clever Commute taps into the collective experience of commuters in an effort to make their commute easier. The free service connects people that ride the same train or bus line so they can send alerts to other riders about potential delays in real time. The result is more immediate and actionable information than is provided by transit operators.

Clever Commute currently covers commuter train, bus and ferry lines around New York as well as the El in Chicago. Unfortunately, the New York City Subway is not covered. Maybe they are waiting for wireless service to be installed in underground stations.

via The New York Times

Adding Tags to the Connections Theme

Upgrading to WordPress version 2.3 will give you tags. But, all that taggy goodness will be invisible unless your theme has tag support built in. The Connections theme (currently in use here) has not been modified by the author since 2005, so it is blissfully unaware of tags. Getting basic tag support should be as easy as inserting a the_tags template tag in an appropriate place–I added it near the end of post.php. Unfortunately, this didn’t work. Fortunately, a post on in the WP support forums put me onto the path.

Older versions of WordPress themes used the following code to start The Loop:

< ?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

As of WordPress version 1.5, the beginning of The Loop changed to:

< ?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

By now, you’re probably wondering what this has to do with tags. Be patient, here it comes. the_tags does not display anything when used inside the start_wp function. This is easily remedied by changing start_wp() to the_post(). So the beginning of your Loop should look like this:

< ?php if ($posts) : foreach ($posts as $post) : the_post(); ?>

Once this change is made, your tags should show up as expected. In the case of the Connections Theme, you’ll need to make this modification to the following files:

  • category.php
  • date.php
  • index.php
  • page.php
  • search.php
  • single.php

At some point, it would be a good idea to go through this theme and get rid of any deprecated functions–such as start_wp. But, the above steps will get you tagging right away and you can really fix the theme at a later date.