Problem:
I want to display the stock level with different colors depending of the stock value.
Solution:
You can get the the custom field "_stock" value with Views shortcode:
[wpv-post-field name="_stock"]
Then use it in [wpv-conditional] shortcode, like this:
[wpv-conditional if="( '[wpv-post-field name="_stock"]' gt '3' )"] ... stock is greater than 3 ... [/wpv-conditional]
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Dieses Thema enthält 2 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von vor 6 Jahren, 2 Monaten.
Assistiert von: Luo Yang.