Vary WordPress templates for different pages

Project Overview

It never hurts to read a manual, an FAQ or a Help page now and again. Whatever you know about a piece of software you’d be surprised what you can find out by going back over some instructions, maybe with a specific task in mind. My task was to create a number of templates for a WordPress-based website. Each template differed slightly from the other and would be used for pages in different categories.

So in WordPress it’s common to work with one theme or layout, with the front page possibly showing a newsfeed and then some other “pages” displaying less time-dependent content. So you might add a differing layout to the index and page elements of the theme. But then it’s possible to add other themed pages. reading the WordPress Codex page on Pages – http://codex.wordpress.org/Pages a useful tip is to add a couple of lines of code at the top of the file:

<?php
/*
Template Name: TemplateFile
*/
?>

Where TemplateFile is the name of your template. Add some other code and formatting such as the content, then the magic. Go into Pages > Add New and there’s now an option in Page Attributes for a Template in the dropdown list.

Project Details

Sign up for DJA Online Services Updates

* = required field

powered by MailChimp!

 

 

Like what you see?

We've built literally hundreds of websites over the years, including work for London Local Authorities, Nestle, B&Q, Avid, Orange,Toyota, Barclays and Sainsbury's along the way. If you like what you see here, or want to know more, then please get in touch.

Contact us

Other Recent Projects

WordPress Book Launch Website

Find out More

East end Trades Guild

Campaign Website & Online Petition Created With WordPress

Find out More

Simply Rhino

WordPress 3D News and Video Website

Find out More