How to make a WordPress theme

There are some files that you will necessary create to build a new WordPress theme.
Actually the only 2 files that are required are the style.css and the index.php, of course if you want to give more features to the theme, you will need to add the following pages:

  • style.css – the theme’s official stylesheet with theme info
  • index.php – ultimately the fallback page for anything without a unique theme file
  • home.php – your blog’s homepage whether static or archive content
  • single.php – a single post/article layout
  • page.php – a single page layout
  • archive.php – used as a catch-all for archives like categories, tags, authors, and dates
  • 404.php – the default 404 error page layout

You can still add more specific files to have better a defined content and page layout.
It is important also that you learn to create child themes to the main theme, so if you need to upgrade your theme, specific CSS information will be on the child theme, so they will be not overwritten with every theme update. The simplest theme possible is a child theme which includes only a style.css file, plus any images. This is possible because it is a child of another theme which acts as its parent.
For a detailed guide to child themes, see Child Themes.

WordPress Themes live in subdirectories of the WordPress themes directory (wp-content/themes/ by default) which cannot be directly moved using the wp-config.phpfile. The Theme’s subdirectory holds all of the Theme’s stylesheet files, template files, and optional functions file (functions.php), JavaScript files, and images. For example, a Theme named “test” would reside in the directory wp-content/themes/test/. Avoid using numbers for the theme name, as this prevents it from being displayed in the available themes list.

Looking for quality WordPress hosting? Check out Arvixe Web Solutions


Tags: , , , , | Posted under WordPress | RSS 2.0

Author Spotlight

Facu Puig

I make websites since 1997, I use Adobe since 2004 and Wordpress since 2007. Fascinated by design at the age of 8, thanks to my father, a multi award winner graphic designer.

One Comment on How to make a WordPress theme

  1. Aarav says:

    Nice tutorial, waiting for such detailed tutorial. Now m sure i will make one :)`

Leave a Reply

Your email address will not be published. Required fields are marked *