Skip Navigation

[Resolved] double shortcode

This support ticket is created 2 years, 5 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.

This topic contains 2 replies, has 2 voices.

Last updated by simchaH 2 years, 5 months ago.

Author
Posts
#2218941

Hi,

I have two conditional statements that I am trying to implement for my view loop to display correctly. The first one works correctly, it is the below code, and it only displays the shortcode if the "shiur-starts-sunday" field is not empty:

    [wpv-conditional if="( $(wpcf-shiur-starts-sunday) ne '' )"]

  • <p>Sunday: [types field='shiur-starts-sunday'][/types] - [types field='shiur-ends-sunday'][/types]</p>
  • [/wpv-conditional]

    I input this second conditional statement right after the previous one, for if the field IS empty to display a string of text "No Shiur Today", however for some reason this conditional statement is not working:

    [wpv-conditional if="( empty($(wpcf-shiur-starts-sunday))) )"] No Shiur Today.[/wpv-conditional]

    Would you happen to know where I am going wrong in this second statement?

    Thanks!

#2219183

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Without looking too deeply, in your second shortcode the if attribute has three opening parentheses and four closing parentheses, so is syntactically wrong.

Remove one of the closing parentheses, does that work?

#2219483

That was super easy. Thanks Nigel!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.