Web Site

Posts filed under Web Site

Displaying Custom WordPress Category/Tag Lists

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress
Custom Category/Tag List Screenshot

Custom category list with RSS feed links and post counts

In my sidebar, I have displayed lists of categories and tags, but wanted to have greater control over these lists than what is offered by the currently available template tags. Namely, I wanted to be able to display each category/tag with a link to the RSS feed on the left, and a post count on the right. So, based on a helpful blog post, my own meanderings in this WPTavern forum thread, and help from DD32 and mfields in this WPTavern forum thread, I have custom category and tag lists, complete with links to the RSS feeds and total post counts for each category and tag.

Here's how:

Custom Category List

Add the following code to your sidebar, or into a widget:

<ul class="leftcolcatlist">
$catrssimg = "/images/rss.png";
$catrssurl = get_bloginfo('template_directory') . $catrssimg;
$customcatlist ='';
$customcats=  get_categories();
foreach($customcats as $customcat) {
$customcatlist = '<li><a title="Subscribe to the '.$customcat->name.' news feed" href="'.get_bloginfo('url').'/category/'.$customcat->category_nicename.'/feed/"><img src="'.$catrssurl.'" alt="feed" /></a><a href="'.get_bloginfo('url').'/category/'.$customcat->category_nicename.'/">'.$customcat->name.'</a> ('.$customcat->count.')</li>';
echo $customcatlist;

Custom Tag List

Add the following code to your sidebar, or into a widget:

<ul class="leftcolcatlist">
$tagrssimg = "/images/rss.png";
$tagrssurl = get_bloginfo('template_directory') . $tagrssimg;
$customtaglist =''; $customtags =  get_tags();
foreach($customtags as $customtag) {
$customtaglist = '<li><a title="Subscribe to the '.$customtag->name.' feed" href="'.get_bloginfo('url').'/tag/'.$customtag->slug.'/feed/"><img src="'.$tagrssurl.'" alt="feed" /></a><a href="'.get_bloginfo('url').'/tag/'.$customtag->slug.'/">'.$customtag->name.'</a> ('.$customtag->count.')</li>';
echo $customtaglist;


You will need to modify $tagrssimg and $catrssimg depending on which RSS image you choose to use, and where you upload that image. If you use an image outside of your theme directory, you will also need to modify $tagrssurl and $catrssurl accordingly.

Yet To Come

Eventually, I will release a series (and/or collection) of widgets, including the above two custom lists.

Haloscan Discontinued: Why NOT to Use Third-Party Services

Filed in Web DevelopmentTags: Geekery, Haloscan, Plugins, Web Site, WordPress

When I first started blogging many years ago, I used the Blogger platform, which I imported to my own domain using FTP (so that anyone reading my blog would see it as www.chipbennett.net). At the time, Blogger's commenting system was rather rudimentary, so I opted to use a third-party comment management system called Haloscan.

Interestingly, due to developments over the past couple of months, had I stuck with this arrangement, I would be in serious trouble. Recently, Haloscan was bought by Echo, which has announced that Haloscan is being discontinued in a matter of days. Likewise, Blogger has recently announced that it is discontinuing support for FTP importing of Blogger-hosted blogs to third-party domains.

Fortunately, I long ago left Blogger for the infinitely better self-hosted WordPress. Thus, even though Blogger has implemented a replacement service - their Custom Domains feature - and therefore the change would be minor, I don't have to worry about it at all.

More problematic, however, is the announced discontinuation of the Haloscan commenting system. When I first moved to WordPress, I continued to use Haloscan, which I had been using on Blogger. At some point, I decided to make the jump to native WordPress comments - but I still had several hundred comments hosted by Haloscan.

At the time, I was unable to export those comments from Haloscan, as such exports required the purchase of a Haloscan Pro account. So, I modified my blog theme to account for the old Haloscan comments, and kept a hybrid system.

Now, however, with the announced discontinuation of Haloscan, my hand was forced. Fortunately, Echo offered the option of converting to a (paid) Echo account, or exporting Haloscan comments. I quickly exported my comments, as I had no desire to pay for something that I was doing natively from within WordPress.

Thus, the problem became one of how to import several hundred comments into my WordPress database? Fortunately, this script came to the rescue, with a slight modification provided by the script developer. Using the provided script and the export.xml file provided by the Haloscan export, I seamlessly pulled all of my several hundred Haloscan comments into my WordPress database.

If you find yourself facing the same situation, the above script should help you as well.

Importing Blogger-Integrated Haloscan Comments

If you need to import Blogger-integrated Haloscan comments into your WordPress installation, follow the instructions provided by the script author, at the above link.

Importing WordPress-Integrated Haloscan Comments

If you, like I did, integrated your Haloscan comments directly into your WordPress installation, do the following:

  1. Download the script.
  2. Replace lines 77-81 of the script with the following code:

    $meta_records = $wpdb->get_results("select * from $wpdb->posts");

    foreach ($meta_records as $meta_record) {
    $blogger_to_wordpress[$meta_record->ID] = $meta_record->ID;

  3. Upload the modified script file to www.domain.com/wordpress/wp-admin/ (where domain.com is your domain name)
  4. Export your existing Haloscan comments by logging into your Haloscan account and following the instructions provided.
  5. Upload the resulting export.xml file to www.domain.com/wordpress/
  6. Using your browser, go to www.domain.com/wordpress/wp-admin/import-haloscan.php
  7. Click the "OK" button to perform the import.

If your experience is like mine, you may get an error regarding a malformed XML file, due to its encoding. There are various options for rectifying the problem, but in my case, I just went to the line in export.xml indicated by the error message, and replaced the non-UTF-8 characters (in my case, fancy quote marks) with valid characters, and re-ran the script. Everything worked flawlessly at that point.

De-Linking LGF

Filed in Politics, Web DevelopmentTags: Democrats, Web Site

Just a quick note: Little Green Footballs has been removed from this site's blogroll.

I have been a long-time reader of LGF, ever since Charles Johnson's "throbbing memo" broke open the Rathergate (Bush National Guard) scandal of 2004. I appreciated his evisceration of the MSM as well as his support for Israel and exposure of Islamofascism.

However, since that time, LGF has devolved into little more than an anti-Christian, pro-evolutionism, pro-Global-Warming, right-wingers-as-extremists, guilt-by-association site, in which any dissent is treated with capricious banning.

I have maintained the link to LGF, out of appreciation for his past work as well as the few things about which we still agreed. However, I can no longer do so. My action follows suit with the good folks at Power Line, who took the same action last week, and is precipitated by Charles Johnson's crude, baseless, and unwarranted attack on Gateway Pundit's Jim Hoft.

I will not speak disrespectfully of Charles Johnson; we simply have divergent - and, apparently, incompatible - beliefs regarding socio-political policy and treatment of those who frequent and comment on our respective blogs.

I, too, miss the Charles Johnson we all once thought we knew.

WordPress 2.7

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

The latest version of WordPress, 2.7, was released earlier this week. The release, code/nick-named "Coltrane", brings several major back-end improvements:

Lorelle lists several reasons to upgrade immediately. Ryan Boren discusses the release, including what features were moved to the 2.8 (or later) blueprint. He also notes that WordPress 2.7 was downloaded 100,000 times in the first 20 hours after release (the counter reads 195,849 downloads at the time of this post), and that some bug fixes are already making it into the planned 2.7.1 release.

I upgraded late last night, and the upgrade went apparently smoothly. As always, let me know if you notice anything amiss. I will be working on some of the new features, such as nested/paged comments, in the near future.

WordPress 2.6

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

The WordPress Development blog announced today's release of WordPress 2.6. Lots of (mostly incremental) changes; see the following video:

Download WordPress 2.6 today.

Also, be sure to let me know if anything seems broken here after the upgrade.

WordPress 2.5.1 Security/Bugfix Update Released

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

WordPress 2.5.1 has been released. This version is a security and bug-fix release.

Version 2.5.1 of WordPress is now available. It includes a number of bug fixes, performance enhancements, and one very important security fix. We recommend everyone update immediately, particularly if your blog has open registration. The vulnerability is not public but it will be shortly.

Some of the listed improvements include:

  • Performance improvements for the Dashboard, Write Post, and Edit Comments pages.
  • Better performance for those who have many categories
  • Media Uploader fixes
  • An upgrade to TinyMCE 3.0.7
  • Widget Administration fixes
  • Various usability improvements
  • Layout fixes for IE

Upgrade, if you haven't already.

WordPress 2.5

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

WordPress 2.5 has been released. I have installed it, and everything seems to be working fine - especially on the front end (though I'm still exploring the new admin interface).

Let me know if you notice any issues, and if you use WordPress, go install Version 2.5 now!

Upgrade to WordPress 2.3.3

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

WordPress Version 2.3.3 has been released, and is an important security update.

Back in the Saddle

Filed in Web DevelopmentTags: Geekery, Web Site

Sorry for the interruption. I was implementing some internal changes on the web site. Everything should be working fine now, but if you notice anything amiss, please let me know!

WordPress 2.3.2

Filed in Web DevelopmentTags: Geekery, Web Site, WordPress

The latest version of WordPress - version 2.3.2 - has been released. It is mostly a security update. Get it while it's hot!

Edit: Make that Version 2.3.2, not 2.3.1 - it's late; I'm tired!