If you have come to this page via the theme credit link in the footer of another site, please understand that I am just the author of the Wordpress theme. Please do not contact me about the site you came from, as I am not affiliated with the site in any way.

Tag Archives: WordPress

Elegant Grunge 1.0 released

A significant update to my WordPress theme, Elegant Grunge, has been released. New features and fixes include:

  • Configurable sidebars! Choose from no sidebar, a sidebar on the right (the standard layout), or a double sidebar on the right!
  • Support for WP 2.7 paginated and threaded comments
  • Support for a custom header image – just enter a URL to an image, typically a transparent PNG, and it will appear in the header instead of the text (SEO friendly)
  • Some bug, compatibility and i18n fixes


p>Note: If you have problems with this theme, please post your question at the WordPress forums. Please don’t contact me directly, as I don’t have the resources to help you.

Also tagged , , | Comments closed

Custom Permalinks


Custom Permalinks is a WordPress plugin that gives you ultimate control over your site structure.

Lay out your site the way you want it. Set the URL of any post, tag or category to anything you want. Old permalinks will redirect properly to the new address.

Read More »

Also tagged , | Comments closed

‘Paged Comments’ plugin theme for Elegant Grunge

I’ve recently enabled the Paged Comments plugin for this site, as the comments over at the Elegant Grunge page were getting a little large in number. A few tweaks were required to make it look right, though.

So, here’s the Elegant Grunge theme for the plugin – put this in the ‘themes’ directory under the ‘paged-comments’ plugin directory.

Tagged | Comments closed

Some useful mini-plugins for WordPress

Originally for my own use, I put together a couple of WordPress plugins, which I thought I’d make available in case they were useful to anyone else.

Google AdSense shortcode

This is the simplest plugin, which provides an ‘adsense’ shortcode to output a Google ad. To use it, use Google’s tools to create the ad, then paste it into the php file where indicated, then put {adsense} (replace the curly braces with square brackets) in posts/pages where you want the ad to appear (remove the spaces around the square brackets).

And now for a demo + shameless attempt at monetization:

Media player

This one is useful if you occasionally post a video file on your blog, and host it locally. If you use video more frequently, there are plugins that probably are more suited, but I personally didn’t want the overhead, and I wanted to store videos in the standard upload locations, instead of having a separate repository, which seems to be what other plugins do.

This one uses the JW FLV player, provided in the plugin. Use something like:

{media source="" width="400" height="308" preview=""}

(replace the curly braces with square brackets)

I used this just the other day on a post demonstrating the output of the simulator I’ve written for my PhD.

Music player

This is the plugin that renders the content for my music page, as well as providing mini-players for other posts. Give it a path to a directory, and it will display all mp3 files in that directory with flash players based on the XSPF Web Music Player. Recently-added mp3 files will be marked as ‘New’. Use something like:

{musiclist path="path/to/my/music"}

(replace the curly braces with square brackets; add optional nolink=”true” parameter to avoid linking to the mp3 files from their titles)

For just one track, use:

{audio source="path/to/audio.mp3"}

Also tagged , | Comments closed

Twitter posting lists with images


Recently I released some code to discover and embed Twinkle images linked from Twitter postings, and released a modification to Ricardo González’s Twitter for WordPress plugin which uses it.

I’ve now implemented support for Twitpic as well.

Grab the modified WordPress plugin here:

After installation, add the widget and make sure ‘Discover images’ is ticked.

For non-Wordpress users, the base code is also available here:

Include it in your twitter list source code, and use it as a filter for the message content. Something like:

$message = TwitterImageUtil::processContent($message, $mysql_database_handle);

Some configuration is possible – see the header comments for more details.

The code will create a thumbnail of the image, and store it locally. It’ll also cache the results in a MySQL database for speed. It supports Lightbox, too – just supply the relevant flag to turn it on.


  • Version 0.2.6: Bugfix for posts with both images and @mentions
  • Version 0.2.5: Bugfix from prior version, plus compatibility fix for Twitpic changes
  • Version 0.2.4: Updated to match Twitter for WordPress v1.9.2: Compatibility fix for WP 2.7
  • Version 0.2.3: Another update, chasing the moving target that is Twitpic
  • Version 0.2.2: Updated to match Twitpic’s new image storage using Amazon S3.
Also tagged , , , | Comments closed

Advanced web templating with PHP and regular expressions

This post describes a method to gain more control over the styling of images for web templates/blog themes, using a bit of Regular Expression magic. This is the technique used for my recent theme, Elegant Grunge.

You’ve just designed the most beautiful template ever – pleasing composition, clean lines, smooth colours and gradients and an awesome typeface. You apply it as the theme for your blog, or release it to the community, and there is much rejoicing.Example of the 'SH Trocadero' WordPress theme with image

Then you or someone else inconsiderately puts a photograph into a post – disaster! That nasty square of graphic just destroyed your composition, and the page is unbalanced and suddenly looks terrible.

Images are particularly tricky to make work with a theme, mostly because they’re so unpredictable. With text, it’s easy to control the way it looks. With images, they can be any colour or shape, many of which will break the composition of a theme, especially if the design elements of the theme contains irregular lines.

A big impediment to making images work is the limitations introduced by the current versions of CSS: All you can really do is provide a square border, possibly with some padding. That’s it, unless you’re willing to manually add tons of markup around images every time – and willing to make your users do it, if you’ve released a theme.Example of images in the "Green Light" WordPress theme

Some people will carefully Photoshop-up their images to make them fit – Webdemar (who made the theme I first used on my blog) does this, for example, and it looks great. That’s a lot of work, though, especially if you make frequent posts with images!

If you’re a theme designer, there’s an easier way to make images work.

Read More »

Also tagged , , , , | Comments closed

“Elegant Grunge” WordPress theme

“Elegant Grunge” is an unwashed yet crisp WordPress theme inspired by It features:

  • Layouts options
  • Support for custom background and header
  • Widget-ready footer
  • Optional full-width page template that removes the sidebar


Read More »

Also tagged , , | Comments closed

New WordPress theme

I’ve designed a new WordPress theme that uses grungey elements I found in some old photos around Carlton, inspired by Function’s theme. It has some cool features –

  • Images are automatically surrounded by frame eyecandy, with some nifty regex replacement – it really makes images pop
  • A photoblog tag page displays entries in a photoblog style
  • A custom page template allows sidebar customisation – supply a list of tags to display related posts, and display arbitrary text/html.
  • Per-page and per-post configuration, and global configuration via admin interface

Let me know what you think – and if it’s broken for you. I’ll release it publicly soon if all is well.

screenshot.png 200810051416.jpg

Also tagged | Comments closed