How Templating Saves You Time

One of the greatest things about WordPress is its templating power. You can install several base files and then an index.php file, and the whole site will autoload content, titles, images, and meta tags in through that one template. The benefit being that you can pre-load your time into a single iteration and then scale the pages infinitely with little effort from then on. Basically, you put a lot of effort into a single file and it will turn out better in each future iteration than if you created them individually every time.

The fun doesn’t stop with pages or posts however, you can do this with your commonly used functions to create a highly repeatable set of content types, widgets, etc. and save time across all of your projects. Let’s look at an example: Staff Listings.

A lot of businesses want to feature their staff on their website to provide a personal feel and also to build up the SEO juice of the website. However, there can be a lot of complexities to these if you’re doing them right. You have several types of rich snippets for Google, a custom post type to build out, and 5-10 custom metabox fields. Not to mention the query, calling all of your metaboxes, proper if statements and then testing.

If you were to do this for every site, you’d be looking at 30-45 minutes per + styling. This is crazy inefficient. You’re spending way too much time on each individual iteration and there will certainly be variations in the quality, loop styles and more. However, you could create and test a really, really solid template of a listing in about 2 hours and have a higher quality product that can be used on multiple sites.

Having that extra time upfront gives you more time to research the perfect loop type and caching, give that post type icon the extra little zing, add a function for manual calling and maybe even give the client a shortcode. This pays for itself in less than three sites. You’ve spent less time overall and your customer gets a higher quality product. Everyone wins.

Keep in mind, you’re still creating a custom solution for each client. It will still be custom styled and you’ll likely add or remove a couple of metaboxes. You’re just getting rid of all that boring and repetitive nonsense.

Here are a couple of pointers when you’re creating these templates:

Spend even more time on your first type

You’ll be creating more than a staff listing over time – you’ll want testimonials, feature boxes, highlights, etc. and you’ll likely be copying some code from your first type. Every mistake you leave in the first one and gets carried over into your next type. So spend the extra hour to really, really polish it up and you’ll save more time over the long haul.

 Start With Your Current Need

Combine these with your needs. Maybe you don’t need a staff listing first thing but you’re working on a project where testimonials will be important. Combine the time with your project and build the template into that site first. This is about working smarter, not harder.

Version Your Templates

This sounds like a lot of work, but you’ll thank yourself later when you’re trying to remember when you dumped that now depracated function.

Keep Reading: Insights & Curiosities

OTM Hi Fi Image of a keyboard

Lo-Fi vs Hi-Fi: Which is Better?

When working on a video or photography project, budget and time are often the key factors determining the quality of your end result. It can be...