Screenshot of Driveline website

For this website the client wanted to be able to present many different categories, makes, and models of vehicles which they lease. The easiest way to  organise this on the backend was to set the site up as an eCommerce website, but without any purchasing functionality.

For the eCommerce side of things I used WooCommerce. The client provided a custom design, which I implemented, as usual, as a responsive,  mobile-first, Genesis child theme. With all the different types of vehicles a good search interface was key. Because much of the data was stored as custom fields I needed to install the Search Everything plugin in order for users to be able to locate the correct vehicle. The design also called for custom styled drop-down select boxes. These are a nightmare to try to handle cross-browser with CSS, so I used a jQuery plugin instead – Selecter from the Formstone family, which has a very elegant documentation website.

This project also had another couple of unusual features. One was a requirement for the possibility of having custom header image for each post, page, product, or category. While it is easy enough to use the featured image for such a purpose, most of these pages already used a featured image for another purpose. Instead I installed the Multiple Post Thumbnails plugin to handle most of these cases, WP Custom Category Image to handle the categories, and wrote a custom function to retrieve the appropriate image.

The second feature was to allow a large section of boilerplate text to be inserted on product pages via an iframe, to avoid falling foul of Google’s duplicate content penalty. To allow the client to easily edit it, this had to be a regular WordPress page with a custom page template. However because the height of the text would vary depending on the screen size I had to use a snippet of JavaScript to prevent scrollbars from appearing and breaking the illusion of seamless text.

Finally, to import and manage all the vehicles, whose prices change weekly, the client wanted the ability to upload from a spreadsheet, for which I used the free plugin WooCommerce CSV Import along with its premium addons. (This plugin has also proved used in setting up other WooCommerce sites.)