Creating a custom theme for WordPress is probably not as difficult as you imagined. With the help of a starter theme, the process can be much easier.
What and Why a starter theme?
A starter theme is a boilerplate that you can start with to develop your own WordPress theme.
There are many advantages for using a starter theme, one of most important one is that you do not have to worry about the complexity invovled in coding a theme from start, your theme is always functional and you can improve it bit by bit.
There are plenty of starter themes available, including Underscores, UnderStrap, and Bones.
We’ll be using Underscores in this article. It’s a minimal starter theme, which only contains the basics.
How to develop a WordPress Theme
Step 1: Set up a local environment
The first thing is to create a local development environment. There are many ways to do this, I recommend XAMPP, which is a cross-platform and free PHP development environment.
Step 2: Download and install a starter theme
Visit Underscores’s official website and name your theme:
You can also click on Advanced Options to customize the base theme:
After you’ve made your choices, you can click on Generate, which will download a .zip file containing your starter theme.
Now you will need to install it on local site by uploading it.
Step 3: Learn about the basics of a WordPress theme
First, you’ll have to learn about template files.
WordPress determines which template files to use on each page by going through the template hierarchy.
Another important element you need to understand is The Loop.
Step 4: Configure your theme
Add Functionallity with ‘Hooks’
Add Styles with CSS