WordPress.org

Ready to get started?Download WordPress

Forums

Change WordPress Theme Depending on Category (3 posts)

  1. glidem
    Member
    Posted 3 years ago #

    Is there an easy bit of code or plugin available that when a particular category is used within a post, on display in full, a different theme is selected?

    Thanks in advance...

  2. Kamran Zahid
    Member
    Posted 3 years ago #

      I am also looking forward for a similar help.

    I am developing a site of a vendor.
    He had 10 categories of furniture (categories may be added).
    On main page, he wants an image slider containing 1 image of each category. (I have done that).
    Upon clicking any image it should open the concerned category, with posts of that category. (I have done that, too)
    All the stuff should be dynamically updated, as per adding in the posts.
    PROBLEM IS: I need to display image slider on every category, showing the images of that particular category.

    e.g
    Category 1 = A, B, C
    category 2 = D, E, F
    Category 3 = G, H, I
    etc

    When category 1 opens, the image slider should show images of A, B, C ..... etc.

    Someone please please please help.

    Thanks.
    Kamran Zahid

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

    WordPress simply doesn't operate this way.

    You can, however, change the style/layout entirely based on category: simply add a "category-slug.php" (where "slug" is the category slug - e.g. if your category is "foo bar", the slug is "foo-bar", and the template file is "category-foo-bar.php").

    You can customize the layout/style of this template file however you would like.

    Then, you can further customize the style, by making use of the ".category-slug" class applied to the BODY tag.

Topic Closed

This topic has been closed to new replies.

About this Topic