Load default image if post thumbnail doesn’t exist
-
Hi,
I want to display a default image in the loop, if the post doesn’t have a featured image.
To this end, I’ve tried:
[loop type=post] [if exists] [field thumbnail-link] [else] <img src="unsplash-2.jpg"> [/if] [field excerpt] [/loop]
But it doesn’t display the default image. Image URL is absolute (and working when opened in a separate tab) btw.
How can I achieve this? Thanks in advance.
- The topic ‘Load default image if post thumbnail doesn’t exist’ is closed to new replies.