Select Page

Quick and simple.

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, search how to create 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.php file. 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.

Share

with your friends!