Add a method to select different template options for WordPress classification
This article mainly introduces the method of adding different template options for WordPress classification, which is very detailed and has a certain reference value. Interested friends must read it!
We sometimes want different categories to be displayed in different styles according to the content of the categories. The usual method is to build several different layout style classification templates in the current theme root directory, such as category-1.php, category-2.php, category-3.php., after the number is the corresponding classification ID number, or use the is_category () function to add judgment, the operation is a bit tedious. There is an easier way to install the Custom Category Templates plug-in.
When the plug-in is enabled, an option to select a template is added when editing the classification.
To create several page templates with different layout styles, the template header must have a similar logo: