For Case 1: Building from scratch
- First you need to create the
Theme Stylesheet
calledstyle.css
for registering the theme. - Then create the
index.php
file form your rawHTML
index file. - After that break down the
index.php
intoheader.php
,index.php
andfoter.php
to create the primary scaffolding for your theme. -
Then create
functions.php
archive.php
page.php
single.php
search.php
comments.php
front-page.php
home.php
date.php
author.php
category.php
tag.php
attachment.php
image.php
404.php
rtl.css
-
Now create a directory called
assets
and create two more folder calledjs
andcss
. Put your themesCSS
andJavaScript
files on those directories - After that enqueue those files in
functions.php
withwp_enqueue_style()
andwp_enqueue_script()
function. - And your full scaffolding is done here. Now you’re ready to write your loops and related
HTML
to your theme. From here after you follow standard procedure according to WordPress convention to write your theme.
For Case 2: Using starter theme such as _s
For any starter theme all the scaffolding is already done. So you can start putting you CSS
and JavaScript
codes in the *.css
and *.js
files given with the starter theme and you can manipulate the loops as well as other codes comes with the starter theme. If we break down the process it would be like-
- Install the starter theme.
- Put your
CSS
codes in the*.css
file and*.js
file. - Start manipulating the theme files for getting your design and functionality.
For both case it would be great if you import the Theme Unit Test
data provided by WordPress.