Tell us what you are trying to do?
Show or hide some code based on whether or not a WYSIWYG field has any content in it
Is there any documentation that you are following?
https://toolset.com/forums/topic/hide-empty-fields-2/
What is the link to your site?
hidden link
In the example, the 'Reviews' header should be hidden because it's inside a conditional that checks whether the field 'Reviews' has any content. I have tried all the methods I can find but none of them work.
Hello,
You can setup the wpv-conditional shortcode like this:
[wpv-conditional if=" ( ( $(wpcf-test-wy-1) ne '' ) ) " ]
<p>Not empty</p>
[/wpv-conditional]
Please replace test-wy-1 with your custom WYSIWYG field slug.
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional
Unfortunately that doesn't work 🙁
[wpv-conditional if="( ( $(wpcf-reviews) ne '' ) ) "]
<h3 class="reviewsheader">Reviews</h2>
[types field='reviews'][/types]
[/wpv-conditional]
still shows the H3 heading even when Reviews field is empty.
I have tried it in my localhost with fresh WP installation + the latest version of Toolset plugins, it works fine, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/