Using WooCommerce, Can I Change The Color Of The Title Or Product Title Based On What Category You Are In?

1.) At the end of the “functions.php” file, add this block of code: function prod_cat_terms_append_body( $classes ) { $prod_cat_terms = get_the_terms(getPostIDFromURL(), ‘product_cat’); if ( $prod_cat_terms && ! is_wp_error( $prod_cat_terms ) ){ foreach ( $prod_cat_terms as $term ) { $classes[] = strtolower($term->slug); } } return $classes; } add_filter( ‘body_class’, ‘prod_cat_terms_append_body’, 0 ); Basically, the above code […]

Read More