adsense

How to Use a Category Template in WordPress





1. Open your main WordPress directory in your Web hosting control panel or FTP program. Consult your WordPress hosting provider for directions on how to access this directory on your particular server.
2. Copy the existing template file on which you want to base your category template, such as 'archive.php' or 'index.php.' Name the new file 'category.php' if you want to use it for all categories. Name the file 'category-slug.php'--replacing 'slug' with a specific category's slug--or 'category-id.php'--replacing 'id' with the ID number of the category--to make a template for just that category.

3. Edit the new category template file as needed. For example, you may want to add the word 'Category' in the
tag in the header or add the category's slug as a header. Use the following code to refer to the current category name:

Comments

0 Responses to "How to Use a Category Template in WordPress"

Post a Comment

Popular Posts

About