WordPress Checklist – Custom Themes

Custom themes

Never customise default WordPress themes

You should never use the default WordPress themes as a boilerplate to new client sites as:

  1. There are files and functions that you will not need, keep your theme clean and robust.
  2. The outside world knows what file and function names the default themes use which opens the door to security holes and take advantage of bugs.
  3. Use your own boilerplate.

Think of the next developer

When creating new files and functions within your new theme you should keep in mind that other developers will be working on this at some stage so use the following structure before you proceed:

  1. Use comments in your code and functions
  2. If you are using templates, the filename should reflect the name of the page that uses it. eg. tpl-about-us.php
  3. Insert a README file explaining the project and your input.
  4. Insert a CHANGE LOG file

“What if the client…?”

This is a question I ask myself when working with any framework. “What if the client wants to remove/add/change” an element or structure. Can it be easily changed with the current design and functions? Will it break the site? Cause an error?

If you think of the bigger picture and take into account that the client might want to change the way elements look and work it will make your website more accessible and will grow organically.

I will touch on this further in the blog.

Make everything editable

From the Client logo to button names, everything should be made editable by combining Custom Post Types and Advanced Custom Fields (ACF) will a hard coded fall-back. It gives the client more control over the website which although will require more training and testing it will satisfy their needs.

Boilerplate

When creating a new theme always use a boilerplate theme that has stripped out the unnecessary functions and files.

WP functions.php

The WordPress functions.php file can be daunting at first but you should only have functions in the file that require an alteration of core wordpress behaviours. - http://codex.wordpress.org/Functions_File_Explained

Listed in the boilerplate functions file are useful functions that you might require. If you don’t need any functions in the file simply delete the content in the file and upload it.

Click here to view some useful functions.