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
- What does the token %1$s in WordPress represent [closed]
- the_author_posts_link css class
- Archive listing of posts by publish year (multiple years)
- Add custom field to attachments in a specific category
- Display all posts in current category
- wp enqueue style and style sheet depth
- How to display related posts from parent category
- CSS saved & enqueued, but wordpress doesn’t load css text, only file
- How can I set custom order use this function
- Is it possible to use the featured image of a page as a css background without inlining?
- How to display a value from a radio button in the options menu in wordpress
- Check if Product is in a Specific Category in Functions.php
- How should I best target dynamically served content?
- How to scale image with equal width and height without distortion?
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- An unwanted inline style is added to my body tag
- Problem adding class to body_class
- Category Thumbnail Display – How to display ONLY the main Category
- How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts
- Swapping wp_dropdown_categories function with wp_category_checklist
- Selectbox in admin panel function linking to CSS
- how to save selected option in variable for rest api category filter
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Gravity form built in Captcha
- How does wp_enqueue_scripts work?
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- how to show only specific category for a template
- WordPress style.css not updating, only after theme reload
- Adding logo to WordPress header
- Thumbnails appear to be zoomed
- height should be set to auto to avoid pixelation in the post thumbnail function
- Add Codepen animation as Preloader to WordPress
- Reduce size of responsive title
- How to array only one key from another array
- WordPress archive page showing 404 Error [duplicate]
- Displaying posts based on category
- Clickable image link sends people to wrong URL
- Get categories names as an array to use it in theme settings
- Creating a mobile site by adding a new class to the body tag from functions.php
- Removing WordPress Footer -without access to PHP code?
- How to get the last category name of a child category?
- How to separate categories with commas?
- Show all tags within a category?
- Post repeated when opening in overlay, how do I solve this? [closed]
- Alphabetically Ordered Category in WordPress
- Loading Posts & Category with Ajax
- How to get current category
- WooCommerce: Display product categories to make IF statement
- Assign Custom classes to every Excerpt
- Show parent categories of the current category
- How to check if a category has a parent and child categories?
- Get category id when SEO URL is turned on
- Adding a navigation page state to individual blog and portfolio pages
- Display latest post from WordPress Featured Category that is also in X,Y,or Z categories
- Inline CSS header style priority function.php Child (no enqueing I think)
- Display Sibling WooCommerce Product Categories on Archive Page
- How to put search bar & logo in the “primary navigation” storefront theme?
- display the months of a specific category
- Add Custom Category Description When Empty
- List sub categories and corresponding posts of a parent category
- How to add a CSS class to this php code [closed]
- Dropdown category field inside repeatable metabox
- echo cutom css code to WordPress page template file ? is this safe?
- Use CSS tag inside PHP code
- Warning: Use of undefined constant all – assumed ‘all’ (this will throw an Error in a future version of PHP) in C:\Users\…….. on line 6
- how to add functions to my function.php using a child theme?
- How to show category just on specific pages?
- Replace header with large image on home page only, using Genesis child theme
- Add a default style if no Featured image is selected
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Using Sprit-sheet on WordPress categories
- All categories options or All categories not Populating
- Add class for the_post_thumbnail_caption()
- How to include different html tags in the header for different pages?
- How to stop loading my custom scripts files for wordpress iframe?
- CSS loading as empty file in Custom Theme
- How limit the width of a fixed menu-bar on scroll?
- Font-Family does not looks like how it should be [closed]
- Where to find the html for WordPress site? [closed]
- How to remove image on single product and get product to span page?
- widget: input the px value from user and use it as inline style in widget function
- Show contact 7 form in popup
- How Can I Center the Logo in the Navigation Menu? [closed]
- Trying to see if page is category or single and displaying title with appropriate heading tag
- How to change the menu color
- category & sub category order issues in wordpress
- Fix incorrect related posts code snippet
- Display a list of posts corresponding to a category
- How to customize posts in WordPress by using HTML and CSS?
- How to create and add js and css file when server is not on my PC?
- which php or css file has generated an inline style in WordPress that overwrites my css
- How to create categories out of a list of words?
- Header location [closed]
- Blog listing not showing dates for every post and arrow missing off image
- Is there a way of displaying related posts from lowest hyrachical order (lowest child category to parent category)
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- Exclude a category ID from the following function