Laying out a grid in WordPress

For a recent project, I needed to lay items out in a series of grids, sometimes three columns, sometimes more. The CSS provided by the designer looked something like this: I could have used jQuery, or some of the more advanced CSS selectors, to achieve this, but here’s what I created as a custom WordPress …

Dealing with sold out products and the PayPal BMSetInventory API method

I’ve just built a WordPress custom post type which allows you to sell a few simple products on your site by interacting with the PayPal Button Management API. (It wasn’t easy. PayPal’s documentation is full of duplicated informal, distributed all over the place, and badly maintained.) One thing which isn’t mentioned in the documentation is …

Handy sendmail debugging commands

Some sendmail commands I’ve just found useful, but couldn’t locate on Google. Get the current status of a message in the queue: grep  ‘james@example.com’ /var/log/maillog Get the headers for an email: cat /var/spool/mqueue/qf[message ID] Get the body of an email: cat /var/spool/mqueue/df[message ID] (Many thanks to my old friend Mr Matt Westby for his help with …

Gravity forms access for editors

Gravity Forms is an excellent WordPress plugin, which allows flexible and easy control and creation of pretty much any kind of form in your website. Behind the scenes it has a very flexible integration with the WordPress system of roles and capabilities, which governs who can do what in your admin area.

Some security suggestions for WordPress (and other) sites

Someone on the Manchester WordPress User Group mailing list recently asked about checking their WordPress site for malware, and as I’ve spent some time decontaminating a WordPress site which was fairly riddled with malware recently, I thought I’d write up some quick pointers which might help you (or me in the future). I’ve broken them down …

Trust your gut, also use SMART Utility

For a while now my laptop has been running *extremely* slowly. Recently it got worse and about every other startup would just freeze until I forcibly powered down and tried again. I ran Apple’s Disk Utility and told it to check the error messages from the drive’s internal SMART systems: “this drive is verified”. I …

Excluding one category from the main WordPress feed

Today I needed to exclude a category from the main WordPress posts feed, the one you’ll find at http://mywordpresssite.com/feed/; however I didn’t want to exclude posts in that category from other feeds (especially not from that category’s feed at http://mywordpresssite.com/excluded-category/feed/). Here’s how I set about it…

WP Super Cache and WP Touch (Pro)

On one client’s site we’re using WP Super Cache and WP Touch Pro, and it bothered me that while WP Touch Pro ensures that mobile users get a lovely optimised theme, it wasn’t serving cached pages for those queries. Until recently we were hacking both WP Super Cache and WP Touch (pre-Pro) to achieve this, …

Scaling WordPress & Co-ordinating Code at WordUp Whitehall

Thanks to Simon Dickson for inviting me to speak at WordUp Whitehall, a specialist and informal one day WordPress conference for people working in UK Government. I don’t do enough speaking, something I need to address, and this was a great opportunity to share some of the knowledge gained from working on relaunching the recent …

Mine ears have attended dConstruct 2010

I remember seeing the speaker list for dConstruct 2010 go up and thinking “that is so so awesome, I am definitely going to that”: Merlin Mann, Tom Coates (particularly), John Gruber. Amazing. Then this summer it was decided that we should have a family holiday, with my in-laws, between the 21 August and the 4 …