Issues in K2 theme with Sidebar Modules

The K2 theme is one of the more popular WordPress themes, and I’ve used it in various guises on several different blogs. However recently it has been causing issues with its own Sidebar modules, giving quite random behaviour, some will work, some don’t work at all, and some when placed in the middle of the sidebar will wipe out working ones under it. So it is about time I got it sorted out. Some investigation on the K2 Forums suggested that the latest builds has fixed this, so I decided to try it out.

This was the process I used to fix it:

  • I downloaded the latest nightly build of K2. The one that worked for me was revision 323. Once they release their next full version, I would suggest using that instead (I was on 0.95rc1, which I had installed after 0.91 to try and fix the sidebars issue).
  • I changed the theme on my blog to the default one for now. I’ve had issues in the past with making changes with K2 live, so better to be safe than sorry.
  • I unzipped the K2 files, then logged onto my server. I renamed the directory with the existing version of K2 to K2old. There are a couple of reasons for this, one of which is that if things go wrong, or I just don’t like the new version, I can change back to the old version in a click. Both version will be selectable in the themes section of WordPress once I’m done now. I copied the new version over, and went into k2/images/ to chmod to 777 the headers directory. This allows you to upload new header images for K2 within the admin interface. If you have any old images in the previous version of the theme, now is the time to copy them over as well. This was the other reason for not deleting the old version.
  • I could now go to K2 Sidebar Modules, add new modules, and they show up fine on the site.

Job done!