Skip to main content
We are Brand SEO Beijing serving international business, your marketing partner, Contact us by

Website production theme single page template page.php

A blog site, including enterprise sites, picture sites, etc., can be classified into two categories: articles and categories; articles can be divided into ordinary articles and independent pages.In the WordPress background, articles and content have been distinguished. In fact, articles and pages are only two article forms. They are stored in the same table in the database, and the storage method is the same. Only one attribute is different: post, page.Therefore, the way of adding pages and displaying them is the same as that of posts. Their template code pages are basically similar, but we can change them according to our needs.
The page.php file has been edited in the previous tutorial. The header code, sidebar code, and bottom code have been added. For the body content, you can follow the method of adding index.php or add single. php method.
The addition process is omitted.Duplicate content is meaningless.
But there is still something to say.
When we add a page, there is an option page attribute on the right:
Choose a page template
You can see that there is a page template option, generally only the default template, which is our page.php, if you want to add another template, for example, you copy page.php, and then rename it to page-tep.php,
Edit page-tep.php and add it at the very top

Then enter the background editing page, you can see that there is a message board option.
Two templates are provided in our downloaded theme package: full_width.php for the no-sidebar page, and contact.php for the contact page.
The content is added in the same way.
Source of this article: WordPress Theme Creation Tutorial

Back to Top