Skip Navigation

[Resolved] Displaying shortcodes only if they are not empty or blank

This support ticket is created 9 years 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Alok Sharma 9 years ago.

Assigned support staff: Caridad.

Author
Posts
#208669

Hello,

I checked this https://toolset.com/documentation/views-shortcodes/#vf-153493 but I am unable to understand how to apply it for the following shortcodes. I want to display the following only if they are not empty or blank:

[wpv-post-taxonomy type="email" separator=", " format="link" show="name" order="asc"]

[types field="notes"][/types]

Any help will be highly appreciated.

Thanks,

Alok

#208693

Dear Alok,

Try like this:

[wpv-if evaluate="'[wpv-post-taxonomy type="email" format="text"]'!=''"]
Not empty
[/wpv-if]

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#208907

Hello,

Thanks, it worked like a charm but you forgot to mention this for the following:

[types field="notes"][/types]

#209115

Dear Alok,

I found no problems using the same syntax. Are you having trouble?

[wpv-if evaluate="'[types field="notes"][/types]'=''"]Empty[/wpv-if]
[wpv-if evaluate="'[types field="notes"][/types]'!=''"]NotEmpty[/wpv-if]

I tested with a WYSIWYG field, what type of field is yours?

Regards
Caridad

Regards
Caridad

#209182

Hello,

I was trying it like this [wpv-if evaluate="'[types field="notes" format="text"]'!=''"].

But thanks a lot. The one you suggested worked like a charm.

Thanks,

Alok