I am currently building a web site, which uses WordPress as a platform. It’s not a blog, but an extended a very customized content management system (CMS) with several authors and a lot of custom plugins.
One of the things the client requested was maximum flexibility of the front page. They want to have a number of information blocks, such as currency quotes, market analysis, navigation menu, and advertising units; and they want to be able to rearrange them once in a while.
This is, of course, a perfect task for WordPress widgets. If you are not familiar with WordPress widgets, I only have two things to say to you right now:
- You are missing on a lot of fun.
- Subscribe to RSS feed of this blog, as I’ll be talking a lot about WordPress widgets.
Anyway. I have created all the widgets that they wanted, and I tested them to work properly. But there was a tiny problem. WordPress install comes with a few widgets of its own. Things like archives, blogroll, recent comments, and search box – all have a widget version. But most of these widgets, as good as they are for a regular blog, didn’t make any sense for this web site that I am working on. There are no archives. Calendar has a totally different meaning. And comments are disabled and hidden.
Of course, I could just left the widgets out of the sidebars. But why give user a choice which doesn’t work or makes no sense, right? I wanted them removed. Hidden. Unavailable. And I didn’t want to modify any core WordPress files, so that upgrading this web site to a newer version of WordPress is easier in the future.
Here is my solution to the problem.
Read the rest of this entry »