Skip Navigation

[Resolved] Split: how set the conditional logic with user custom field – how to conditionally show featured image

This support ticket is created 4 years, 1 month 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 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assigned support staff: Minesh.

Author
Posts
#1172177

Hi Minesh, yes, it work very fine!
Now, I'm trying to set the conditional logic to display e general image when there is not a featured image selected.

#1172218

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Here is the Doc where you can find all the required details to display the conditional output based on the featured image:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#checking-if-a-post-has-a-featured-image

For example:

[wpv-conditional if="( NOT(empty($(_thumbnail_id))) )"]
  featured image is NOT empty
[/wpv-conditional]

[wpv-conditional if="( empty($(_thumbnail_id)) )"]
  featured image is EMPTY
[/wpv-conditional]