Please post the address of your site.
Hello my friend. My site is still on localhost but I will post an image.
In the example, the color red applies to this product category: Tv Box1. Using the code
/* .et-product-detail .product-showcase {
background-color: tomato; */
but that code applies color in all categories. I would like to specify the category for the color target.
Image: https://ibb.co/1sFzCGs
The image doesn’t help. I wanted to examine the classes in the body tag with browser tools. I should expect to find the category amongst the classes. For example, on my site, for the mobile phone category, I would use:
.term-mobile-phones {
background-color: tomato;
}
I understand, I will return when he is online.
But his code worked, but he applied the category page. I would like to apply the color only to the background of the product page.
Anyway, thanks for the help.
The same technique applies to product pages. For a particular product, by body classes include postid-7307 where 7307 is the id of the product. Your site may be slightly different. So I would write:
.postid-7307 {
background-color: tomato;
}
You can’t directly target all the products in a category. This is because products may be in one or several categories. The product category is not one of the classes for a product page. You would need to write a style for each product page individually.
That’s it! Thank you very much!