I just went searching for a nice, simple example of populating a form from a database, using AJAX and JSON. I hope it's just that my Google juice is depleted after a hard week, but I couldn't easily find one. So I wrote one.
The wp-e-commerce shopping cart plugin lets you sort your products by a few different things: name (product title), price, date/time created... but it doesn't let you sort by category name and then product title. Here's what I just came up with for one client; it isn't generic, but other developers should be able to adapt it for their circumstances.
Like many developers these days, I use a bunch of different virtual machine images to give me access to multiple development and test environments without having a room full of computers. My VM of choice is QEMU KVM, the kernel-based virtual machine bundled with Fedora. I've always used simple shell scripts to start my VMs, which has allowed me great flexibility, but yesterday I set one up using the nice Virtual Machine Manager (VMM) GUI application. And remembered why I wasn't using it: there's no way to tell it how to do TCP port redirection! But now, there is a way...
Role Scoper is a very handy WordPress plugin for websites that need to manage access to pages for a range of different user classes. But it has a nasty habit of getting in the way sometimes, and it can mess up the pagination of a custom WP_Query by changing the number of found posts (found_posts). Here's how to tell it to leave you alone!
It's quite common to use WordPress as the host for an online shop, and that often means having an order page that needs to be encrypted via SSL. You don't want your customers providing credit card details or other sensitive information over an unencrypted connection! But many WordPress plugins don't take SSL into account, and merrily load scripts and stylesheets without encryption. Here's a couple of ways to fix this problem.
The Events Manager plugin for WordPress is pretty flexible, allowing you to easily add custom attributes to your event posts. It also has conditional placeholders that allow you to display or hide information conditionally. There is a nice tutorial on the plugin website showing you how to add your own conditional placeholders. Lets bring this all together with a conditional placeholder for a custom attribute.
WordPress now comes with a reasonably complete copy of jQuery UI, which you can easily incorporate into your themes and plugins using wp_enqueue_script. But it doesn't come with any jQuery UI themes, leaving you to supply your own. Here's how to make use of the standard themes easily.
The Events Manager plugin for WordPress lets you record and display your upcoming events, and is highly extensible through hooks and templates. Here's how to give your single event page an Add to Calendar link that lets your visitors copy your events into Microsoft Outlook, Thunderbird, and any other iCalendar compliant calendar.
I just stared in horror wonder at the wp-e-commerce script that handles cart updates. Wow. Just... wow. Forget any thought of nicely hooking into that to add some extra client-side actions, it's a mess and looks like it will probably get worse before it gets better. But fortunately, there is another way.
Whilst I personally don't have a problem with it, some clients just plain don't like the Howdy in the WordPress admin bar. Maybe it's too familiar, too casual, too... American. Whatever the reason, satisfaction is just a few lines of code away.
CSS drop-down menus are very popular on sites with a hierarchy of pages. They let you get to where you want to go without having to navigate the pages in that hierarchy. But pure-CSS menus suffer a problem: touch devices often can't show the drop-down, because they don't have "hover" and clicking on the top level link goes there. This snippet offers a way around that.