Tag Archive for 'k2'

Missing Comments With K2

As part of a recent upgrade on this site I installed the latest version of the excellent K2 theme, taken from the nightly builds. Following the upgrade I noticed that although comments were still intact on posts, they were missing from pages. All the old comments still existed in the admin backend, but they were not shown on any pages, and neither was the comment form. I discovered that since revision 747 of K2 it is necessary to have a custom field called ‘comments’ associated with a page in order for any comments or the comments form to be displayed. This leads to a problem in itself; if you try to add an empty custom field to a page then a rather unhelpful error message is displayed and the operation fails. The solution is to give the ‘comments’ field a dummy value, anything will do as it is never displayed. Save the page and voilà: any existing comments and the comments form will resurrected below the content.

The moral of the story? If you want the latest and greatest version, at least spend five minutes reading the changelog!

K2 Style Switcher

When porting my sites from WordPress to WordPress Multi User (WPMU) I took the opportunity to upgrade K2 and implement the K2 Style Switcher plugin which you can see in action in the sidebar. Unfortunately, it doesn’t come out of the box with WPMU support, so I made the necessary changes. The modified plugin can be downloaded here. This version will work with both vanilla WordPress and WPMU, enjoy.

Update: I am now working together with Kimya Hasira (the original author) on the development of this plugin as described here. It has found a new permanent home on this site. Check out the page for information about the plugin.




Copyright © 2007-2009 Hugh Johnson

Site last updated Fri 6th Nov, 2009 @ 17:29