Get the App
SLTechnology News&Howtos  ›  Servers  › 

Add a method to select different template options for WordPress classification

Shulou Source: shulou.com Published: 2022-06-02 05:08:30 09月30日 Update

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:

Tags: Categories templates different selections methods content plug-ins themes codes functions layouts styles forms pages tedious value interests heads guys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Docker Apple Shulou Technology Shulou Tech Info