First of all, my apology to Tony Lauria for making him wait for a long time and for not being able to upload these images earlier as promised. Life has been exceptionally busy, but I’ll save the details for another blog post.
It was a pleasant surprise for me to find out that Tony and some other Emptiness Theme users like to the header images from previous versions of the theme and requested their availability for download. Thanks so much for using the theme.
So here they are (in chronological order)…
Light greenish-yellowish leaves on tree branches in front of my home in Carnegie. This picture was used as the default header image from v0.1 to v0.9 of the theme.
The most frequently asked question from Emptiness Theme users was about customising the styles (font, color, width, etc) and the header image of the theme, and I usually answered by giving them some pointers to which file to modify and where. The problem was that most WordPress users would make the modifications directly against the theme files.
The downside of such approach is that the custom code would end up buried within the theme, which users won’t remember few months down the line. And this will then discourage them from upgrading the theme in order to avoid overwriting the customisations accidentally.
A cleaner approach to customise a theme is by isolating the custom code away from the original theme code. Having said that, I would like to encourage my theme users to start practicing this approach. Here’s what you need to do:
Install MyCSS Plugin, read the documentation on how to use the plugin. Note: you might encounter an error complaining about ‘my.css file not found’, to fix this, you need to create my.css file under mycss plugin directory and give it a proper permission (644 will do).
When you need to customise a style, do it on my.css file. CSS code in this file will take precedence over the theme’s own style.css .
For example, to change the font-family of the sidebar headings, I added these lines to my.css file:
font-family: helvetica, sans-serif;
That’s it. I didn’t modify any of the theme code. The catch here is of course we have to be careful not to accidentally delete my.css file.
I don’t know why WordPress doesn’t have this custom CSS feature as part of vanilla WordPress installation. I think this would be very useful when they finally provide easy theme upgrade just like the way upgrading plugins is done.
As for MyCSS Plugin itself, it would be nice if it allows me to customise the location of my.css file so I can put it external to the plugin directory. And how about storing the content of my.css in the database so it can be persisted between plugin versions? Another nice improvement would be to provide the ability to upload files, handy for custom images.
Since I started using WordPress few months ago, I’ve tried various minimalist themes available from WordPress Theme Viewer, but none of them really suits me. So, just like any designer-wannabe, I rolled out my own minimalist theme. It’s available for download, though I’m still trying to register it on WordPress Theme Viewer. I don’t know what’s wrong with Theme Viewer, they must be really busy with backlogs of registrations to process, or they’re totally ignoring the current Theme Viewer and currently building a better system.
Creating a WordPress theme was actually quite pleasant. PHP might not be the most elegant thing out there, but it does the job. I must give a standing ovation to WordPress Codex, it is one of the bests if not the best open source documentation.
There are some of my Blojsom themes that never saw the light of day, I’ll port them to WordPress later. Have theme? Will port!