Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Input quantity and stock status in vertical results › Reply To: Input quantity and stock status in vertical results
July 10, 2024 at 9:32 am
#48744
Keymaster
There is a nifty trick where you can do that by using a bit of custom CSS trickery
For the field use this:
<span class="{_stock_status}"></span>
This will apply a class name instead of the actual text. Now add this custom CSS somewhere (either in your theme settings or under here):
span.instock::after {
content: 'In Stock';
color: green;
}
span.outofstock::after {
content: 'Out of Stock';
color: #ff6600;
}
So the text appearing via CSS will depend on the stock status itself 🙂