WordPress theme creation

WordPress theme list displayed on desktop

Author: Dawid Adach

-

So here we are, ready to develop our first WordPress theme. In this tutorial, we will create the most common theme - a blog template.

1. Placeholder folder

Let's create a folder to store our template. Navigate to the folder where your WordPress is installed (if you haven't done that yet follow this tutorial). Navigate to wp-content/themes, you should see three default themes (twentyfifteen, twentyfourteen, twentysixteen). Create a new subfolder and call it mdbblog.

2. Creating a style.css file

Create a style.css file (you can use any text editor, I use Sublime 3) and paste the following code into it:


/*
Theme Name: MDB Theme
Theme URI: https://mdbootstrap.com
Description: This is outstanding WP theme developed on Material Design for Bootstrap 4
Version: 4.5.5
Author: MDBootstrap.com
Author URI: https://mdbootstrap.com
*/
              

3. Creating index.php

Create index.php file and paste the following code into it:


<h1>One day I will be a writer!</h1>
              

Congratulations! You've just created your first theme. Perhaps it isn't the most beautiful nor useful theme you have ever seen, but we will take care of it soon. Let's activate it. Open your admin dashboard, go to Appearance in the left menu, and then click Themes.

You should see your new Theme (MDB Blog) on the list.

WordPress themes list

Click on the Activate button, and navigate to the home page.

If you see the text "One day, I will be a writer!", it means that you have succeeded in creating your first theme.

Lesson summary

In order to create WordPress theme you have to create at least 2 files: index.php and style.css.


Rate this lesson

Previous lesson Download Next lesson

Spread the word:
Do you need help? Use our support forum

About the author

Dawid Adach
For more than 5 years Dawid worked as an IT Consultant specializing in SOA/EAI/ESB in the banking domain. He gained experience working in countries like Netherlands, Belgium, Poland and India developing enterprise-class systems for the most prestigious companies. Since co-founding mdbootstrap.com & brandflow.net in 2016 he has been using and teaching technologies such as Angular, TypeScript, PHP, AJAX, Mongo, SQL, Hadoop Stack, Virtualization, Automation and many others...