How To Create a WordPress Theme for Beginners – Part 2: The Structure

efore we start to code, first we have to sketch our web layout that we want such as where the header or logo, menus, sidebar (if any) or anything else. This step may seem inconvenient but for some, this step will help them to focus and know their design direction.

So for this wordpress theme tutorial we will create it like below:

From the above diagram, we will create 4 different PHP files (index.php, header.php, sidebar.php and footer.php) to produce one homepage wordpress theme template. Please not that we will using header.php, sidebar.php and footer.php in every single template page. To understand the basic code structure of these 4 files, I’ll break it down in below HTML5 code.