Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter apcarry

    (@apcarry)

    I have just read this: http://codex.wordpress.org/Category_Templates#Different_Text_on_Some_Category_Pages

    When they say

    category-#.php

    what does the # represent?

    The # represents a name. So if you want to make a unique template for a category called “Cakes” it would be category-cakes.php. So just make a copy of your default category.php file, rename the copy to category-cakes.php, and add the image you want.

    The name of the particular category you want that particular WordPress Theme Teamplate Page to effect. So if you have a category called “Food” you can create a PHP document called “category-food.php” and put in your code to display that particular category.

    But an even easier way (if I’m understanding what you want to accomplish) is to create a CSS class in your stylesheet called “category-raised-eyebrow” or what not. Take a look at the generated html code of your page – WordPress provides handy class attributes – including the name of the page! – inside the generated HTML code. You can use these class attributes to apply custom styling just with your CSS stylesheet. No special template pages in your theme needed. So in your “raised-eyebrow” category, you can create a style in your stylesheet called .category-raised-eyebrow{ /*your styles here*/ } and customize it to your hearts content!

    for anything above general suggestions, please contact the developer of your theme for support.

    this forum does not support commercial themes; http://codex.wordpress.org/Forum_Welcome#Commercial_Products

    Thread Starter apcarry

    (@apcarry)

    Thanks bemdesign!

    The name of the particular category you want that particular WordPress Theme Teamplate Page to effect. So if you have a category called “Food” you can create a PHP document called “category-food.php” and put in your code to display that particular category.

    But an even easier way (if I’m understanding what you want to accomplish) is to create a CSS class in your stylesheet called “category-raised-eyebrow” or what not. Take a look at the generated html code of your page – WordPress provides handy class attributes – including the name of the page! – inside the generated HTML code. You can use these class attributes to apply custom styling just with your CSS stylesheet. No special template pages in your theme needed. So in your “raised-eyebrow” category, you can create a style in your stylesheet called .category-raised-eyebrow{ /*your styles here*/ } and customize it to your hearts content!

    Do I also need to make a category.php or does using the css code completely bypass the need?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to make each category page look different?’ is closed to new replies.