FAZD: National Center for Foreign Animal and Zoonotic Disease Defense

FAZD
Standard

FAZD, a part of Texas A&M’s AgriLife division, is a research center focusing on animal disease. In addition to the usual news and informational pages, the site needed to showcase the Center’s research projects, tools (the finished results of past research projects, like diagnostic tests or software packages), and the people involved in them. These used to be listed by hand on standard WordPress pages, but the group wanted a more interconnected site, with links added between projects and people automatically.

The content model for this site is more complex than most, involving three custom post types — research projects, tools, people — each with a set of custom fields. People are connected to their research projects and tools via the Posts 2 Posts plugin.

There are several custom taxonomies shared across the post types, including topics, diseases, and institutions. Institutions partnering with FAZD on a research project are added to the project when a user tags them in the Edit Project screen.

The institutions taxonomy is also used for People, to indicate which one a person works for. An individual’s bio page shows their connected institutions as well as a list of the research projects they’re working on. The staff directory lists the people associated with FAZD using custom fields for the contact information.

fazd-content-model

The design is very closely based on the Genesis Education theme. It was so close to the ideal site described and sketched in our kickoff meeting that we used it almost as-is, aside from gutting the archive templates to handle the site’s complex post types and taxonomy system.

PressBooks Importers

selective-import-screenshot
Standard

The crew at PressBooks asked me to customize the standard WordPress importer to behave a little differently: instead of immediately publishing the stuff from the old blog, they wanted to put the imported content into a queue and let the user select where it should go: their book’s front matter, the main chapters, or the back matter (which PressBooks has set up as custom post types). The tricky part here was adding a new bulk action — custom bulk actions aren’t supported in WordPress!

Texas A&M University Writing Center

writing-center
Standard

When I was hired in 2007, the Writing Center had a complex site built in Mambo. It that hadn’t been updated in a while. Only the director felt comfortable adding anything, and we had forty-odd enthusiastic students who could contribute — if only they knew how. I updated the to the latest version of Joomla, but the community was splintering again, and some of the plugins we relied on hadn’t been updated. It also just didn’t do things that I expected of a CMS. Its blogging module didn’t support comments. I found another plugin that would add a commenting feature, but it didn’t integrate with the admin interface; you had to type a (non-memorable) code into the text in order to turn on commenting. The search feature was abysmal. The podcast feeds were actually created in a desktop application and uploaded to the server outside of Joomla, which didn’t support enclosures or multiple feeds. Some of those features were added in later versions of Joomla, but at the time, the lack of solid leadership in the developer community didn’t make me optimistic about Joomla’s future.

The Drupal Detour

When we started thinking about replacing Joomla, an event calendar was a major requirement. I chose Drupal, having used it on and off since 2004. I knew it was a beast, but I also knew the calendar module was great. Alas, everything else was a mess. The URL rewrite module didn’t work as advertised. The plugins required to put together a rich text editor with image upload features — something comparable to the one that’s built into WordPress — would not play well together, and I couldn’t create an editing interface that our users would actually use. If your content contributors won’t use the CMS, it’s game over. Fortunately, in the seventeen months (!) since I’d started messing around with Drupal, the central campus web team rolled out a calendar system for everyone. Once the calendar requirement was removed from my list, I was able to ditch Drupal.

The WordPress Migration

I built the new site in WordPress, migrated content from both the Joomla and Drupal sites, redirected the old URLs to the new, modified a magazine theme, and wrote a custom widget to fill in the one feature requirement I couldn’t meet with WordPress or an existing plugin.

The new site was up and running in two weeks. I trained the staff in a single 90-minute session. It was glorious.

I later migrated our Gallery2 photo albums into WordPress, and released the import script I’d written as a plugin.

Structuring Content and Moving to Custom Post Types

The Writing Center site had a lot going on: a faculty blog, two podcasts, a semiannual newsletter, a news blog, video archives from an irregular workshop series, a collection of handouts for students organized into four general categories, and resources for faculty that included a bunch of informational pages and a detailed list of courses.

For the most part, fitting all this into WordPress’s posts vs. pages model wasn’t difficult. All the date-based stuff went into posts, and I used categories to make them look like separate blogs, with distinct category templates and category-specific RSS feeds. The faculty resources were more complicated. Most of them fit into a neat hierarchy, which made pages a logical choice, but that left me with the course catalog.

When I abandoned Drupal, I knew I was giving up the Content Creation Kit that would have allowed me to separate the list of courses from the other web content. I imported those into WordPress as posts, then used category templates to display them separately from the other blogs. I was just biding my time until WordPress 3.0 came out, with its new custom post type support.

I wrote the basic course content type plugin in an afternoon, then refined it over time with added features: extra custom fields, sortable columns, nicer icons in the admin menu. (This code also became the custom  post type example in my book, and you can download the updated code as a zip file.) To move things over from the old posts, I wrote a migration script that I later released as the Convert Post Types plugin. There was no easy way to convert taxonomy types, so I cheated: I edited their database entries manually. (There were only ten of them.)

Launching the Network

While I was working on the Writing Center site, I was also supporting a number of other offices related to Undergraduate Studies. I had most of them running WordPress, but they were all on separate installations. Merging them was a tricky process because some of them shared users, so a straight migration wasn’t possible. I’ve written about the experience.

Inventory: the Content Audit Plugin

When I moved the sites into WordPress, we used the classic content inventory spreadsheet to keep track of things. That was useful, since there were a lot of title and URL changes as we updated pages. However, for the second content inventory I did, after everything was in WordPress, a spreadsheet felt redundant. The post/page list screens contain most of the information on the spreadsheet: an ID number, the title, the URL, the publication date. But some of that information isn’t visible, and we still needed the ROT column and a place to write notes and assign updates to people.

Instead of copying everything into a spreadsheet, I wrote the Content Audit plugin. It uses WordPress’s custom taxonomies and fields to fill in the missing pieces. With the plugin, you can simply check a box to mark something as Outdated or Redundant — and since those labels work just like the built-in categories, they’re very flexible. You can replace them with labels that work for you. There’s a textbox for entering notes, and you can assign a content owner — other than the original author — by choosing a user from a dropdown.

We did our inventory right from the WordPress admin screens, and there was no need to refer to an external spreadsheet that was never up to date anyway.

Theme Framework

In 2011, I built a theme framework that would unify the Undergraduate Studies sites, including the Writing Center. I created a theme with two responsive layout options and six color schemes, all based on the University’s brand guidelines. These options would be available to any site on the Undergraduate Studies network. Then I created child themes for the individual sites that further customized the appearance. For Undergraduate Studies, that meant displaying a monthly feature on the home page. For the Writing Center, that spot was devoted to a photo slideshow followed by the latest news story. The Writing Center also needed the specialized templates for categories and custom post types to display their wider range of content.

The Writing Center is using a child theme of this framework today. The rest of the network never launched with it, as the department’s leadership changed hands the week I finished it, and I left the university altogether a few months later (for unrelated reasons).

Texas Transportation Institute Events

tti-events
Standard

 

TTI asked me to help them implement a custom post type for their conferences (essentially an upcoming events system) and to replace the defunct CheezCap plugin they’d been using to manage per-site customizations for their Genesis child theme. I  implemented an autosuggest function on the conference search form and created a custom RSS feed for the events. I also made the Events site theme responsive.

Texas A&M University at Qatar

tamuq-screenshot
Standard

The Texas A&M campus at Qatar had been up and running with WordPress for a while, but they needed a review of their custom theme. Its developers had, as it turned out, done a lot of things on the checklist of what not to do. The theme included the complete source code of four plugins, some without attribution, all of which were by this time very outdated. I removed the code and installed the plugins, which will now prompt the site’s owners for updates. TimThumb was included, and has now been replaced by WordPress’s native image resize functions — which makes the home page slideshow faster to load and easier to maintain. I fixed some basic SEO problems, like a missing <title> tag on the home page, and generally cleaned up the code, including a lot of inline CSS.

Scott Westerfeld

scott-westerfeld
Standard

When Scott’s Leviathan was published, his publisher hired a graphic designer to revamp his website in fine steampunk style. Alas, the firm wasn’t entirely conversant with WordPress’s best practices, and the result was a table-based (!) design that broke every time Scott added a large image. (Which he does every Friday.) I redid the theme in CSS, fixed the image issues, widgetized the sidebars, and built some custom mini-plugins to make it easier to maintain some of the fun little features, like the lizard message.

Month of Letters

lettermo
Standard

I worked with Mary Robinette Kowal to set up the Achievements plugin for the Month of Letters BuddyPress site. Members earned badges for sending various kinds of mail, and cumulative points for the number of letters or packages they sent. These were reported via a Gravity Form tied to a custom post type, with a taxonomy that provided the checkboxes for the types of mail (parcel, Valentine, overseas).

lettermo-achievements

Because Achievements was in between versions when the event started on February first — 2.x was deprecated, but 3.0 was not quite out yet — I wrote several custom tools and widgets for the site. The code for each badge also had to be done by hand, since they were tied to a custom post type.

lettermo-admin

When the site’s traffic overwhelmed its shared host a few days into the event, I did an emergency migration to WP Engine, where it’s been stable (and much faster) ever since.