I am trying to create altering layout in my list view depending whether or not a post has a featured image.
I figured this would work:
[wpv-conditional if="( '[wpv-post-featured-image]' eq '' )"]
no image layout
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-featured-image]' ne '' )"]
has image layout
[/wpv-conditional]
but it does not. It works when there is no image, but when there is an image nothing between the conditional that checks for it not equalling null outputs.
I also added has_post_thumbnail to the custom functions list and tried this:
[wpv-conditional if="( has_post_thumbnail() eq 'true' )"]
has image layou
[/wpv-conditional]
This also does not work.
How do I format the conditional so it outputs something only when post has an image?
[wpv-conditional if="( NOT(empty($(_thumbnail_id))) )"]
featured image is available
[/wpv-conditional]
[wpv-conditional if="( empty($(_thumbnail_id)) )"]
featured image is empty
[/wpv-conditional]