Title: changing css in categorys(again)
Last modified: August 18, 2016

---

# changing css in categorys(again)

 *  [siam](https://wordpress.org/support/users/siam/)
 * (@siam)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/changing-css-in-categorysagain/)
 * Hi everyone
    I know this has been a topic for a while but it´s driving me mad
   and I just can´t figure what I´m doing wrong.. All I want to do is to change 
   the css if the category changes. I´m using Mapleleaf theme and after reserarch
   i´ve come to the conclussion that the best way to do this is with a conditional
   tag on header.php. This is the code:
 * <style type=”text/css” media=”screen”>
    [@import](https://wordpress.org/support/users/import/)
   url(<?php bloginfo(‘stylesheet_url’);?>); [@import](https://wordpress.org/support/users/import/)
   url(‘category-8.css’); </style>
 *  <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″
 * href=”<?php bloginfo(‘rss2_url’); ?>” />
 * <?php if(is_category(‘8’)){ ?>
    <link href=”[http://myblog.com/category-8.css&#8221](http://myblog.com/category-8.css&#8221);
   type=text/css rel=stylesheet> <?php } else { ?> <link href=”[http://myblog.com/style.css&#8221](http://myblog.com/style.css&#8221);
   type=text/css rel=stylesheet> <?php } ?>
 * (it goes on but this is the bit we need)
    I´m just trying with one category at
   the moment. Of course I´ve uploaded category-8.css in the mapleleaf theme folder.
   The result is none: it displays the default style.css even if we click on category-
   8. Can someone figure out what´s happenning? Am I missing something?
 * Thanks a lot.

The topic ‘changing css in categorys(again)’ is closed to new replies.

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [siam](https://wordpress.org/support/users/siam/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/changing-css-in-categorysagain/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
