Problem:
How can I check if a Custom URL parameter is set, or of a certain value?
Solution:
You can only use the Views ShortCode wpv-search-term
As an example:
[wpv-conditional if="( '[wpv-search-term param="my_term"]' ne '' )"] TEST [/wpv-conditional]
The above sample code will output TEST only if the my_term URL parameter is not empty.
It works everywhere, as long Views is active.
Even if you pass no parameter at all, it still works great.
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
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 |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 3 replies, has 2 voices.
Last updated by 7 years, 3 months ago.
Assisted by: Beda.