Problem: [wpv-post-excerpt] seems to output the post body content when the post excerpt field is empty. This is breaking some conditionals that rely on the value of the post excerpt field.
Solution: [wpv-post-excerpt] will fall back to display part of the post body if the post excerpt field is empty. The way to work around this is to create a custom shortcode that returns the actual value of the post excerpt field. Add this code to functions.php:
add_shortcode('wpv-post-real-excerpt', 'real_excerpt_shortcode'); function real_excerpt_shortcode() { global $post; return $post->post_excerpt; }
Then you should be able to modify your conditional like this:
[wpv-conditional if="( '[wpv-post-real-excerpt]' ne '' )"] [wpv-post-excerpt length="230" count="character" more="..." format="noautop"][/wpv-conditional]
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 2 replies, has 2 voices.
Last updated by 7 years, 5 months ago.
Assisted by: Christian Cox.