Customizing WordPress Templates
Dec 19, 2006I’ve been doing a bunch of work with WordPress lately, mostly customizing templates and writing plugins to make it work more like a “real” content management system (CMS), rather than just a simple blogging platform.
Rather than try to explain all the technical details (I hate doing documentation), I thought I’d just show some examples from two sites I recently worked on: GraceDC and Langham Partnership International. In this post, I’ll focus on some of the design and template-related modifications I made to WordPress’ templating system.
General Design: The first thing you’ll notice when you load those two sites is that they don’t look like WordPress blogs at all. Each design and template is customized specifically for the organization. While there is some minor code reuse, the HTML and CSS for each site is basically unique.
Custom Post Types: One technique that works well is using WordPress categories to effectively create different “sections” of a site with completely different layouts. The template hierarchy in WordPress (e.g. category-slug.php) makes this surprisingly straightforward.
Static Front Pages: Both sites use WordPress’s static front page feature, so the homepage is a proper designed landing page rather than a chronological blog listing. This is the key to making WordPress feel like a real CMS.
Custom Fields: Custom fields are incredibly powerful for extending WordPress posts with structured data — things like event dates, locations, or any metadata specific to your content type.
WordPress is a remarkably flexible platform once you dig into its templating system. With a bit of PHP and CSS knowledge, you can make it look like almost anything.