Books and Authors Plugin

Sun, 02/18/2018 - 08:17

Our team was tasked with building a new website for a non-profit organization in Riverside for local authors known as the Inlandia Institute. The previous website was built on vanilla PHP with a custom CMS. The website had a few hundred authors and subsequently a few thousand associated books.

The CMS was limited and difficult to use and for this reason the owners had rarely used it.

My task was to:

  1. Create an interface where they could easily add and update new books and authors.
  2. Create pages where this content could be dynamically displayed and sorted.
  3. Import the legacy content from the old website.

To make this as simple as possible I incorporated the existing Wordpress plugins: Custom Post Types UI, Advanced Custom Fields and Droplet. 

The APT plugin provides a great way to easily build an interface for user to create custom posts with a number of field types. This allowed the owners to add new authors and books including adding images and links, etc.

The APT plugin has an API to import data from an external source if the plugin is purchased however, I know the data structure. I worked with this plugin in the past so importing the data was very simple including images (for the most part).

The problem was with the legacy data. The old database contained ... old HTML 4 markup that was often broken. My solution was just to strip the markup altogether and to replace any line break tags with line-breaks. Wordpress would automatically turn those into paragraph tags.

Many of the images failed to import correctly so there was a bit of manual uploading there. But, not an overwhelmingly large amount.

The interface sorted the books and authors alphabetically and allowed the books to be sorted by category.