I believe webmasters are using Template construction There is a need for personalized template modification, but most webmaster friends will always have various ineffectiveness after modification. What's the reason? Let's talk about the correct posture of modifying the zblog theme template. In fact, the key problem is nothing more than the following four steps. other Station construction The method of program modification is the same.
1. Find the template file path
In fact, this is a very embarrassing question. Many uses Zblog template 40% of users often come up to the question: "I modified it according to the method you gave me, why didn't it change after the modification?" Of course, it didn't change when you changed the wrong location.
The only template file path of zblog is:/zb_users/theme/topic ID/template/xxx.php
The only path of template style (css) is:/zb_users/theme/theme ID/style/xxx.css
2. Modify Theme Template File
Some webmaster friends know the path of the template file, but there are too many php files under the template folder to distinguish who is who. Here are some common rules to share:
Header.php public header file
Footer.php public tail file
Main template file of index.php homepage and list page
Post-multi.php Summary Article Template
Post-istop.php Top Article Template
Pagebar.php Page Bar Display Template
For more details, see: Z-BlogPHP template file and template tag
3. Update site cache
The website building programs on the market basically have their own set of caching mechanisms. After modifying the template file, the theme template needs to be recompiled to take effect. The zblog update caching method is very simple. You can see the [Clear Cache and Recompile Template] button on the home page of the website background, and click it once. As shown below:
4. Update browser cache
If you modify the CSS style sheet of the template, then you do not modify the php file at this time, you do not need to clear the cache in the third step. If your browser has enabled the cache mechanism at this time, the static files (such as css Js) will be cached by the browser. If you want to see the effect of the modification immediately, you need to clear the browser cache of the current site. The fastest method is: Ctrl+F5 (force the browser to refresh).