How to Make a WordPress Blog Theme Match an Existing Website II

(Continued from “How to Make a WordPress Blog Theme Match an Existing Website”.)

I then copied the page source to a file called index.php in blog/wp-content/themes/bandolier. This is a so-called “template file”. WordPress uses some complicated rules about which template file to use to display different kinds of information. These are explained in the WordPress Theme Handbook page on “Template Hierarchy”, in the section called “The Template Hierarchy In Detail” and the interactive diagram just before it. When handed URLs such as or, which refer to the WordPress main directory, WordPress displays what it calls the “front page”. The site owner can set this to be either a static page or a list of blog posts. I did the latter. And according to those rules, WordPress will display these by running index.php.

Actually, that’s not quite true. WordPress will check for front-page.php and home.php first. If it doesn’t find them, it will use index.php. See “The Template Hierarchy In Detail”, subsection “Front Page display #”. But anyway, for simplicity and to follow Tania’s instructions, I used index.php.

Although my Bandolier theme was far from complete, the next stage was to activate it. Go to the WordPress dashboard, and click on Appearance > Themes. The theme is there in the collection with all the default themes. So

Screenshot of theme-selection page with Twenty Sixteen theme active Screenshot of theme-selection page with Bandolier theme active
Activate the theme and go back to your main URL

The next stage was to adjust for the fact that my index.php, although an exact copy of a perfectly good HTML file, was running in a different environment. So, again following Tania’s write-up, I did the following:

Screenshot of my experimental Bandolier blog-posts page…………

  • style.css
  • sidebar.php
  • index.php
  • content.php

Leave a Reply

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