Forums

[resolved] Using category templates (2 posts)

  1. Deckster0
    Member
    Posted 2 years ago #

    Heya!

    How do I use category templates?
    Is it just like page templates where you can change the template easily at the "post page section".

    I just got started with wordpress and php so I am a little confused.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    A Category Template is used to display posts in particular categories. Using the WordPress Default theme as an example--this theme doesn't have a category.php so based on the Template Hierarchy, WordPress uses the archive.php to display posts in a category. You can copy archive.php to category.php and then use a text editor or the admin Theme editor to edit that Template to customize the way WordPress displays the posts for your categories. If you want category ID 5 posts to be displayed in a manner different than other categories, you can copy archive.php to category-5.php and edit that file to customize how category ID 5 posts are rendered.

    Please see Category Templates.

    Also some other reading:
    WordPress Lessons

Topic Closed

This topic has been closed to new replies.

About this Topic