So on your category page check the body tag in your developer tools. There should be a category class. You can then target that page in your CSS with that classname. This is standard CSS stuff.
.cat-name{ color: blue; }
All other pages will not have that classname and the color:
rule be your default.
Answering your direct question on how to conditionally load a stylesheet:
if(is_category('cats')){
wp_enqueue_style( 'stylesheet-name', get_template_directory_uri() .'/mycss/category1.css', array(), '1.1', 'all');
}
Remember categories and taxonomies can get pretty complex. Custom taxonomies and categories may not work with something as simple as is_category
Related Posts:
- Different background-image by category
- Different post styles depending on category
- admin panel – How to remove “delete” button from category editing page
- Get different images for mobile and desktop with php, advanced custom fields without using js and ajax
- How Display Posts on category
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- get current product name in functions.php
- How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts
- get post based on category chosen in drop down – The ajax method
- How to use transient in this code for related post?
- Slider loading issue
- Creating a related post section based on similar categories
- Plugin CSS not enqueing
- Swapping wp_dropdown_categories function with wp_category_checklist
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Parent theme CSS overriding child CSS rules
- how to remove metadata from the posts of my blog?
- How to style options page in dashboard?
- Theme Options Page – User Updates Logo
- Proper syntax or method for keeping url in modified isotope / category links
- How to use my style.css file outside of wordpress subdomain?
- Dynamic Stylesheet loads but doesn’t finish
- How to add date to navigation bar
- Filter Select results based on selection
- Selectbox in admin panel function linking to CSS
- Can I install/embed WordPress on a ‘single page’?
- Using if/else statements with output from theme options
- Is there CSS to expand the gallery limit on Index Pages?
- What is an equivalent of single_cat_title for getting the slug of the category?
- Issue adding sub category programmatically
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- how do I get a specific post from a post with a subcategory in WP
- How to design a table based on css values set from admin/dashboard
- WP grandchild categories in nested ul li
- Grab posts by multiple categories
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to show single category archive
- Move category description below post list in blog
- How to pick the default selected value in wordpress dropdown?
- Applying A Category to Existing Posts Where Page Title Matches Regex
- Get page that displays all children of taxonomy parent
- selected option if current category is the value
- Incorrect MIME type for assets with Valet
- How to display pictures from database?
- How to add condition in wordpress loop? [closed]
- get_template_part based upon post’s category
- Changing the default object embed sizes?
- Customize position of social icons in upme plugin [closed]
- how to save selected option in variable for rest api category filter
- Setting default category base on theme activation
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Best way to schedule daily change in CSS parameter
- Css loads very slow [closed]
- Hide subcategories (widget)
- Gravity form built in Captcha
- Alert Bar section within WP loop is displaying even though there are no posts
- Let Users Choose Post Categories
- How does wp_enqueue_scripts work?
- How create a Shortcode with hover and complex options
- Display category name only once inside loop
- WordPress Multiple Navigation bars
- How to show only subcategories in parent category not parent category?
- two columns of posts on homepage, one of them “favorites”
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- custom css for admin only
- responsive.css in the WordPress should be prioritized
- How do I add a custom css to all posts without affecting homepage css? [closed]
- how to show only specific category for a template
- Redirect to another page using contact form 7? [closed]
- Which is the correct way to conditionally enqueue a CSS file?
- Custom Background by Page IDs
- proper way to add css using functions.php?
- WordPress style.css not updating, only after theme reload
- Adding logo to WordPress header
- Thumbnails appear to be zoomed
- Use PHP in stylesheet to specify a background image based on Category ID
- Dilemma of Populating all the categories in a drop down list
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- height should be set to auto to avoid pixelation in the post thumbnail function
- Odd / Even posts add class minus first post
- Display most popular posts of category
- Change CSS based on is_user_logged_in
- Creating sub-categories via php
- Define specific category name in PHP
- RTL Stylesheet Confusion with WordPress
- Correct way to enqueue page specific CSS file
- Edit the_category (); for a hierarchical display
- Wrapping a Sidebar within
- JSON REST API WordPress only showing first 10 categories
- Category title output before opening title tag
- get taxonomy thumbnail and use it as a variable in code
- Add Codepen animation as Preloader to WordPress
- Include Parent Term in wp_list_categories
- How to make an embeded a Youtube video from custom field text responsive to screen size?
- WordPress wp_add_inline_style unable to give hex colors?
- Reduce size of responsive title
- How to make container class in PHP