Category: Coding

How to enable checkbox lists for non-hierarchical taxonomies in WordPress

WordPress’ taxonomy features are one of the most powerful aspects of the platform, giving you the capabilities to group posts (including custom post types) in pretty much as many ways as you can think of.

There are two types of WordPress taxonomy – hierarchical and non-hierarchical. In case it’s not obvious from the name, a hierarchical taxonomy has a hierarchy – that is, you can create terms that are children of a parent term (and even children of those children) – standard post categories in WordPress are an “out of the box” example of a hierarchical taxonomy.

A non-hierarchical taxonomy has no parent/child structure, and is basically just a “flat” list of terms. Post tags are the “out of the box” example here.

When you’re developing a plugin for WordPress (or maybe even a theme) you may find that you have a need to create custom taxonomies – for example, if creating a plugin for a property/real estate website, you may have a custom taxonomy for “Property Type”, that contains terms like “House”, “Apartment” etc.

It’s at this point that you may run into a bit of an annoyance with the default WordPress user interface…

getaddrinfo failed: A non-recoverable error occurred during a database lookup.

I faced an interesting (and by interesting, I mean incredibly frustrating) issue with a client yesterday, who had installed a PHP-based application of mine on their new Windows 7 laptop only to find that it was unable to connect to the MySQL database that powered it.

Xinha – hidden editors do not initialise correctly

As most web developers will know, there’s a plethora of tools out there on the Web that can provide What You See Is What You Get (WYSIWYG) editing capabilities within web browsers.

My weapon of choice in this arena has always been Xinha – pronounced Xena (like the Warrior Princess) – mainly because the editor itself is very configurable and easily integrates into my custom Content Management platform.

I came across an issue this morning however, where having multiple instances of the Xinha editor on a single web page – with some of the instances initially hidden, caused problems. When the hidden editors were made visible, they didn’t work properly – they were frozen and did not respond to mouse or keyboard input.

Games That Never Were: Arena

As some people may know, I’ve dabbled in the world of game development before. I’ve never been particularly good at it, if I’m honest, not really down to anything other than a lack of good ideas, and a lack of time to do any ideas I had justice.

It’s something I keep meaning to have another bash at, not in any serious manner of course, just in a “bedroom programmer” kind of way.

Still, I thought I’d make a post about a game of mine that never quite made it past development. It ranks as the most ambitious game project I ever undertook, and actually got quite far down the line.

Privacy Policy & Powered by WordPress & Theme by Anders Norén