Problem: I would like to use a conditional that tests whether or not a post is sticky (Mettre cet article en avant sur la page d'accueil).
Solution:
You can use WordPress's is_sticky function.
1. Go to Toolset > Settings > Frontend Content > Functions inside conditional evaluations, and enter is_sticky.
2. Use this conditional format to test if the current post is sticky:
[wpv-conditional if="( is_sticky() eq '1' )"] This post is sticky [/wpv-conditional]
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 4 replies, has 2 voices.
Last updated by 6 years, 3 months ago.
Assisted by: Christian Cox.