Skip Navigation

[Resolved] Displaying Placeholder Image for empty image field

This support ticket is created 6 years, 4 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 1 reply, has 1 voice.

Last updated by yashwantK 6 years, 4 months ago.

Author
Posts
#924836

Hi !
I want to set up image field in some cpts. But If user leaves that image field empty then I want to display Placeholder image.
How to achieve that ?

#924838

Hi!
That was very simple.

[wpv-conditional if="( (empty($(_thumbnail_id))) )"]
 
<div class="my_placeholder_image">
    <img src="/wp-content/uploads/xyz.png" />
</div>[/wpv-conditional]