Skip Navigation

[Resolved] Conditional statement showing content

This support ticket is created 5 years, 12 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 5 years, 12 months ago.

Assisted by: Shane.

Author
Posts
#1193259

Tell us what you are trying to do?
I am trying to setup a content area to show when two conditions are both unchecked

Is there a similar example that we can see?

{!{wpv-conditional if="( $(wpcf-home-sold) eq '0' )"}
AND {wpv-conditional if="( $(wpcf-home-sold-contingent) eq '0' )"}!}
<div class="homePrice">[format-currency num="[types field='current-price'][/types]" sym="$"]</div>
<div class="homeType">{!{types field='home-type'}!}{!{/types}!}</div>
{!{/wpv-conditional}!}

I think there's a problem with the AND statement, not sure how to setup the code for this.

I have three statements in sequence for this site.

A) Standard price (Neither Sold or Sold Contingent checkboxes are checked)
B) Hide price and show modified price and styling when SOLD checkbox is checked
C) Hide price and show modified price and styling when SOLD CONTINGENT is checked

If I remove the conditional statement, the standard price appears as well as the Sold or Sold Contingent price. So I need to check for both conditions to be 0, and show the standard price. I'm showing only the first condition here.

#1193278

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Thank you for contacting our support forum.

The issue here is that your conditional was combined incorrectly.

The correct way should be .

[wpv-conditional if="( '[wpv-post-excerpt]' ne '' ) AND ( $(wpcf-consultant-gender) eq '1' )"]

Take a look at the example above and modify your conditional to reflect above.

Thanks,
Shane