How to add style in functions.php depending on conditions?


I’m a newbie for coding,
I would like to learn how to add css style conditionally in functions.php
My header controlled by .header-outer class. What would it be the best way to add css depending on category?
I was able to determine category slug (not standard wordpress category) and wrote some if conditions. It’s working but could not understand adding css.
With wp_enqueue_style should I call external predefined css files or is it possible to write directly in functions.php.

wp_enqueue_style( '***', get_template_directory_uri() . '/mycss/category1.css', array(), '1.1', 'all');

Here I could not understand the first *** part ? I would like to embed all style not a class.

Thank you,
Best Regards.

, , , grasycho 6 years 2016-03-09T12:24:42-05:00 0 Answers 90 views 0

Leave an answer