Home Tutorials How to manipulate category templates

How to manipulate category templates

Author

Date

Updated on

Category

One of my favorite WordPress template features is the ability to customize category templates to cater specific categories of your choice.

Here’s my default category template. It simply displays excerpts:

category-default

Here’s my customize category template for category ID #2. This one is actually a theme gallery template:

category-custom

So, how do you manipulate category templates? Simple, duplicate your default
category.php template (or archive.php in some cases), add a hyphen and a number to the name of the new file. For example: category-2.php. Then, start customizing the template for the new file.

The number attached to the file name should be the ID of the category that you want to target.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent posts

How to Optimize Images for Your Blog Posts

Developing a WordPress site is only one half of a complex equation. To get the site going and attract traffic, you have to fill...

10 Ways To Speed Up Post-Building Process With WordPress Gutenberg Themes

There’s no need to explain why I decided to start with Gutenberg-supporting products. All in all, Gutenberg is a well-known and long-awaited product. It is more...

HostPapa Linux Hosting: Reliable, robust and fast

As a small business owner, it can be challenging to find the right hosting provider for your website. HostPapa distinguishes itself from other web...

Are You Making These Costly Mistakes When Outsourcing?

In today’s world, it is almost impossible to find a small business where everything about the business process is done in-house. For most small...

Flat Design for Your WordPress Site: What Is It + 4 WordPress Flat Design Themes

Web designers in the past mostly used 3D styles for buttons that made the button seem more realistic. That all changed when flat design...

Recent comments