Lafayette on WordPress
When Lafayette College approached us about redesigning their site, they asked us to consider WordPress's viability as the platform on which to build it. Typically, we use ExpressionEngine for CMS work and Rails for anything custom, but for Lafayette we decided WordPress was the best choice. In this post, I will describe why we chose WordPress and the tools and features we used to build the site.
The decision to use WordPress was simple: Lafayette was already running a MU install for their departmental sites and had acquired a large amount of institutional knowledge about using and deploying it. They were already eyeing WordPress 3 (which has been merged with MU) as a future platform for those sites, so it was only natural to build the main site with the same tools.
Lafayette's experience with WordPress also meant they were deeply familiar with its features, use cases, and limitations. As a result, the final site fit very well with WordPress's capabilities, and we never struggled with wedging in a feature WordPress isn't intended to handle, something that can be an issue with off-the-shelf platforms.
We started development in May and decided to go with WordPress 3. It was still in beta, but we knew that the release was only a few months away and that we wanted to use the enhanced custom post types, menus, and other new features. This was a great decision—upgrading through the betas to the final release was smooth, and several of the new features proved critical during development.
- Permissions. Different departments maintain different sections of the site. With multi-site, Lafayette can control permissions for each section.
- Custom Post Types. Each section can have the custom post types it needs without cluttering the other sections.
- Themes. Each section can have its own theme with the unique templates it needs, or it can use a common theme with a base set of styles.
We hit a snag when Lafayette requested some sites on sub-directories and others on sub-domains. Multi-site only allows one or the other, so we're actually running two installs of WordPress 3, one for sub-domains and one for sub-directories. This worked fine, but we had some issues with sharing content between sites on different installs, the solution to which I will discuss in a future post.
The header, footer, styles, and basic templates reside in a theme called
lafayette-base. This theme is comprehensive enough to power a site that doesn't need any customizations.
Sites that need unique templates can use a child theme, with
lafayette-base set as the parent. This child theme will use all assets from
lafayette-base unless we explicitly override something. This is great for customizing a template beyond its default in
lafayette-base and we use it all over the place. For example, the home site's pages require some unique markup. The
lafayette-base theme contains a basic
page.php template—to override it, simply create a new child theme called
lafayette-home and add a new
page.php file with the necessary changes.
Child themes enable other kinds of customizations, too. We use the
functions.php file to create custom post types and taxonomies; I'll discuss how to do this in a future post.
One of WordPress 3's most exciting new features is Menus. Menus allow the site's admins to manage a hierarchical navigation menu which can contain any of WordPress's content types: pages, posts, custom post types, links, categories, taxonomies, and text links. This turned out to be one of the most important features for building the site. Each section has different content needs; with Menus, we can give the admins the power to organize the secondary navigation however they see fit.
WordPress has a great ecosystem of plugins, but surprisingly we only used a couple of them. This was a result of Lafayette's aforementioned institutional knowledge: the site was planned and designed to work with WordPress's built-in features, so we didn't often need to reach for a plugin during development.
The two plugins we leveraged were:
- Contact Form 7: This plugin lets us easily create contact forms and insert in any post, directly through the visual editor. It's a fast and easy way to get a contact form on a site, and Lafayette's users were already familiar with it from the MU install.
- Custom Field Template: We used this plugin to create custom fields on posts. It's compatible with WordPress 3 and custom post types, so we can limit fields to specific post types, a feature we leverage in several places.
~ * ~
Though Lafayette's new site is large and complex, through careful planning and knowing WordPress's capabilities and limitations we were able to leverage the platform's built-in features to design and deliver the site without a lot of plugins or other customizations. That said, we did have some custom needs—I will discuss some of these needs in future posts. Stay tuned.
You should follow me on Twitter here.