WordPress.org

Ready to get started?Download WordPress

Forums

custom themes for different category types (7 posts)

  1. andrewpina
    Member
    Posted 3 years ago #

    hey everyone.
    if someone could help me out and link me to a tutorial or tell me how to have a custom theme for specific category types.

    i tried the custom post type UI plugin but that does not help me because i have many of already published posts in a certain category that i only want to change the looks of the pages containing to that category only.

    thanks for any help

  2. andrewpina
    Member
    Posted 3 years ago #

    anyone can help?

  3. andrewpina
    Member
    Posted 3 years ago #

    seriously does WP community suck this bad people dont help support?

  4. dragonsjaw
    Member
    Posted 3 years ago #

  5. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    You can't have different Themes for different categories; however, you can define different template files for each category, within a single Theme.

    You can have separate template files, such as "category-foo.php" (for category "foo"), that will enable you to customize the layout and output for category "foo").

    Also, when viewing the category index, the CSS class "category-foo" is applied to the BODY tag, which will enable you to customize the CSS for the index page for category "foo".

    And finally: please bear in mind that everyone who posts on these forums is a volunteer. You are not entitled to replies, prompt or otherwise. Please be respectful.

  6. andrewpina
    Member
    Posted 3 years ago #

    thanks chip

    i had created a file called single-equipment.php using that codex documents but it did not work

    i am looking to create a single post layout that only refers to posts in the equipment category, not looking to style the equipment category itself

    not sure what needs to be done but i cant seem to find it anywhere.
    I can although style pages and use the equipment.php file to style the page but thats all it does

  7. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    If the category is "equipment", then your template file needs to be named "category-equipment.php".

    For customizing the output of single.php per-category, you'll have to use conditional tags within single.php itself.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.