The products on the category page don’t have their own class. The only way I can do it using css is by counting the products. So if the product you want is number 1 product in the list, you would use:
.products-loop .product:nth-child(1) .price:before {
content:"From: "
}
This isn’t going to work very well if your products keep changing. If so, some more effort is needed for a better way.
Remove all the above css. Put this function in functions.php for your child theme:
add_filter( 'woocommerce_price_html', 'add_from', 10, 2 );
function add_from( $price, $product ) {
$product_id = $product->get_id();
switch ($product_id) {
// list of product ids where this applies
case 1801:
case 2479:
return 'From: '.$price;
break;
default:
// any other products
return $price;
}
}
You must use your own product ids for the products that this applies to. You can have one or many “case” lines. Change ‘From: ‘ to your language.
This is for simple products. The code will need some more work if you have to use it for variable products.