Skip Navigation

[Resolved] conditional for empty term meta wysiwyg

This thread is resolved. Here is a description of the problem and solution.

Problem: I'm trying to create a conditional that tests whether or not a Term WYSIWYG field has content.

Solution: There is a known issue with special characters in conditional content, which can break conditionals. As a workaround, convert double-quotes to

& quot;

without the space, and convert single-quotes to


Our developers are working on a permanent solution to the problem.

Relevant Documentation:

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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 15 replies, has 3 voices.

Last updated by Ido Angel 2 years, 6 months ago.

Assigned support staff: Christian Cox.


i have a taxonomy with a wysiwyg as a term meta field.
I am trying to conditionally display a button, only if the field isn't empty:

  [wpv-conditional if="( '[types termmeta='full-gate-text'][/types]' eq '' )"]
      <div class="gate-more open-more">READ MORE</div>

But it doesn't seem to work. My guess is wysiwyg need a slightly different approach because of html.
How do I go about this?




Hi, try adding the output="raw" attribute and alternating quotes like this:

[wpv-conditional if="( '[types termmeta="full-gate-text" output="raw"][/types]' eq '' )"]
    <div class="gate-more open-more">READ MORE</div>

If that's still not working as expected, add the debug='true' attribute to the conditional and let me know the output.


still doesn't work...
needs to be:

[wpv-conditional if="( '[types termmeta="full-gate-text" output="raw"][/types]' ne '' )"]

(ne and not eq, because I want to show the button if it's NOT empty. anyway - I tried both)

Debug also isn't showing when I tried:

[wpv-conditional if="( '[types termmeta='full-gate-text' output='raw'][/types]' ne '' )" debug='true']



The second syntax won't work because of the nested single quotation marks. The first syntax should work in a View of terms. Can you provide login credentials and tell me where to find this on the front-end?

This is exactly what I have, for reference:

Conditional: [wpv-conditional if="('[types termmeta="book-tax-wysiwyg-1" output="raw"]' ne '')"]it is not empty[/wpv-conditional]
Conditional 2: [wpv-conditional if="('[types termmeta="book-tax-wysiwyg-1" output="raw"]' eq '')"]it is empty[/wpv-conditional]

Hmm, the login is not working for me. Can you check again?



Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ido,

Christian is currently on holidays today but will return tomorrow to continue with this.

However i've tested the credentials for him and they do seem to work. The next thing I would like for you to provide is the URL where he can quickly see where you have setup this conditional.

This is to ensure that he has all the information that he would need to debug this for you when he gets in.



cool - thx.

here are 2 archives - the first should have the button, the 2nd not. but both don't have it:

hidden link

hidden link

the view is "New Gates"


Okay I see, the solution I had in place only works in simple cases, and certain combinations of quotation marks break the conditional. I'll have to continue working on this tomorrow, I just wanted to give you a quick update.




It turns out there is a known issue with special characters in conditionals:
I believe that's why the conditionals here are failing inconsistently between us. In your case, I temporarily deleted most of the content in your WYSIWYG field to remove all quotation marks, and you can see the output here is more like I would expect. I replaced the content for now. It seems that the core issue is the same as the erratum post above, so I have connected this ticket with our internal ticket to resolve that issue. I will keep you posted here as I receive more information. In the meantime, the only workaround I am aware of is to remove special characters from these WYSIWYG fields, or replace " with " in the text content.

Screen Shot 2019-09-04 at 9.00.14 AM.png
Screen Shot 2019-09-04 at 9.00.06 AM.png

Screenshots attached.


thx Christian!

I tried to replace all " with " in one of the gates - but it still doesn't work. Doesn't this have something to do with the "s and 's in the conditional?

[wpv-conditional if='("[types termmeta='full-gate-text' output='raw'][/types]" ne "")']



It looks like the forum is translating the special characters here. I didn't realize there is a single quote in this Gate:
hidden link

I replaced this character:


...with this text...

& quot;

(without the space)

...and I replaced this character:


...with this text...


Here's the format for the conditional:

[wpv-conditional if="('[types termmeta='full-gate-text' output='raw'][/types]' ne '')"]

Perfect! Had to do that for this (hidden link) one two - works great!
thank you for all the help!


Quick note: Blocks 1.3 / Views 3.3 have been released, and the updated plugins include improvements to the conditional parser system, including a fix for checking for empty tem fields and term fields with special characters.