Now that we have learned the rules and terminology, this article will make you more familiar with template files, templates and the structure of each page.
One thing you must remember is that each page of your blog is made up of multiple template files.
The following is an example of a home page:
In the above example, we can see that the homepage consists of four template files: header.php, index.php, sidebar.php and footer.php.
Title template file:
This file usually contains the title and description of your blog. They are usually consistent throughout the blog.
Index template file:
This template file contains the title, content (text and pictures of each blog) and metadata of your blog (referring to the information of each blog, including who the author is, when it was published, how many messages there are in that category, and so on). ).
Sidebar template file
This template file controls your page link list, category link list, archive link list, blog list and other things. The sidebar doesn't have to be on the right. The theme I use is the classic two-column blog layout. )
Footer template file:
Like header.php template files, footers usually don't change with page changes. You can put anything here, but it's usually copyright information.
Now let me explain why the area where index.php is in the above picture is red. Whether Index.php's area is red means that the area will change, depending on which page you are on.
If you are on a separate blog page, this page will contain these four template files: title, single, sidebar and footer.