ZblogPHP's latest template tutorial How does zblogphp modify the theme?

10:48:22, November 15, 2017 Yidian Yidi four thousand nine hundred and seventy-two

Z-blogPHP is a relatively easy to use free website building system, but for many beginners, its WP style theme template structure is slightly complicated, which is easy to confuse people. Today, Yiwu Library will comprehensively explain the template structure of the Z-blogPHP system, so that you can quickly start modifying the template file code related to the theme, and provide a theoretical basis for identification of template selection such as classification and articles.

 php-template.png

First, let's take a look Official Z-blogPHP Wiki For the description of the theme template file, it should be noted that the following templates are only commonly referred to, not limited by the system, and the theme authors may also adopt different names and structures. Gray text adds explanations for this site:

Public template

Header.php public header file (Page module)

Footer.php public tail file (Page module)

Related templates of home page and list page

Main template file of index.php homepage and list page (Some topics will distinguish the home page from the list on this basis)

Post-multi.php Summary Article Template (Page module, usually included in index.php or other list templates)

Post-istop.php Top Article Template (Page module , usually included in index.php or other list templates

Pagebar.php Page Bar Display Template (Page module , usually included in index.php or other list templates

Log page related templates

Single.php article page (single page) main template file (Based on this, the system automatically distinguishes articles from single pages)

Post single.php Log Page Article Template (Page module , usually contained in single.php

Post-page.php single page template (Page module , usually contained in single.php

Comment.php comment area template (Page module , usually included in comments.php

Comments.php Display template for each comment content (Page module, usually included in articles and single page templates)

Commentpost.php Comment sending form template (Page module , usually included in comments.php

Other template files

404. Display template when php article or page does not exist

General display template of module.php module (Page module)

Module-xxx.php sidebar and module template label (1.5) (Page module)

All the above templates marked as "Page Module" are incomplete pages. When selecting a template, you should be careful not to select these page modules, otherwise the relevant content of the website will be displayed abnormally. Whether the theme has different built-in content templates will generally be explained, or the Chinese name of the template can be seen directly as shown in the following figure:

 20171115114303.png

If there is no description or intuitive Chinese name, the theme may not have different content templates built in. In this case, template selection cannot be made. It is better to let it default. In addition, it should be noted that template selection should be based on the right number. Neither article type template for category (list) nor category (list) type template for article can be selected. Otherwise, even if there is no fatal error on the website, the content displayed will be strange.

Usually, the theme template file is in the "website root directory/zb_users/themetemplate/" directory. To modify the file in this directory, you need to click "Clear Cache and Recompile Template" on the background home page to refresh and take effect. * * * is the application ID name, and the "website root directory/zb_users/theme" directory is the configuration file and material file required by the theme.

 20171115121058.png

Excellent, really powerful! Well, we must encourage~

Reward five
account number: mxy310@163.com [Copy]
account number: seventy-seven million nine hundred and forty thousand one hundred and forty [Copy]