Create a WordPress theme from scratch

Introduction

You ever wanted to learn how to create your own WordPress template? It’s really easy to get started. The following steps will help you to create a minimalistic template with a listing-page and an article-page based on twitter bootstrap.


Begin with your Template

Go to your WordPress installation and navigate to wp-content/themes/ .

Create a new directory named by your new theme, in our example my-own-theme .

A very basic version should contain the following files:


header.php

The header.php  file is the global header which will be used in every page template. In our example it will look like this:


footer.php

The footer.php  file is the global footer which will be used in every page template. In our example it will look like this:


index.php

The index.php file is the template used to render a article listing page. In our example it will look like this:

 


single.php

The single.php  file contains the template to view a single article. It looks like this:


style.css

The style.css  file contains the css directives to give our template its unique look. Must be present, otherwise our template won’t work.


Download

Download this tutorials theme.

 

 

Leave a Reply

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