You've now got a functional basic template for your theme. It works great on the main blog page and successfully loads content for anything you can click on in your site.
However, we want slightly different templates for other types of content on our site. For example, a Single Post page needs to have a Comments form where visitors can post comments; the Page page doesn't need to show the date, category, or tags; and the Category page should show the category name.
Before we can create other templates, we need to break up the main
index.php file into parts so that these different templates can share the common elements. I've mentioned many times the importance of the header, sidebar, and footer. We're going ...