WordPress Development

WordPress Command Line Database Upgrade

If you’re like me and manage dozens of WordPress sites, you’ve probably got a shared code base which allows you to upgrade the WordPress filesystem easily.. But most likely you’ve also found it painful to have to visit each wp-admin individually and click the “Update WordPress Database” button. Ever wanted to script this task to run from the command line? Here you go 🙂

Read More »


WordPress: Assign custom CSS classes with the Visual Editor (TinyMCE)

As a WordPress theme developer, it’s very useful to be able to define CSS classes in a theme’s stylesheet, then allow them to be assigned to elements by the user with the Visual editor. Classic examples would be special classes to style links, lists and images.

Read More »


WordPress: Specify a different version of jQuery with wp_enqueue_script()

I find using the wp_enqueue_script function a nice tidy way to include javascript files in my theme. Especially when using scripts that come bundled with WordPress, such as jQuery, script.aculo.us, etc. However I recently had an issue with the very cool Fancybox jQuery plugin not playing nice with the version of jQuery that shipped with WordPress. Here’s the solution.

Read More »


WordPress Function: is_page_or_descendant()

Here’s a handy little function to check if the page you’re currently viewing is a specific page or a descendant of it (child, grandchild, etc). I’ve come across a few simliar functions: is_child(), is_subpage(), is_descendant(), etc; but none that met my needs exactly.

Read More »


WordPress: Add the <hr> button to the Visual Editor (TinyMCE)

Strangely, the <hr> tag (horizontal rule) button isn’t enabled by default in the WordPress Visual Editor (TinyMCE). Here’s how to turn it on, along with any other buttons you want to use.

Read More »