Fallback image if featured image is missing

Hi folks,

I have created a standard page (not a layout page) and added a section that works similar to posts whereby it lists the child pages below that page. See here: https://staging2.heritagemat.uk/about/

I can set a featured image on a page and an excerpt and it pulls that through fine but is there a way whereby on the image (just a div with background set to featured image) if i can set a fallback image so if the page has no featured image, it will use one that i specify?

thanks

Chris

Hey Chris,

Thanks for reaching out!

For us to help you with your concerns, we need to check your setup properly. To do that, please provide the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • Page URL in question

You can find the Secure Note button at the bottom of your posts.

Hope that helps.

Thanks @marc_a . Secure note added.

Chris

Hello Chris,

You must add a condition to your Section so it will only be visible when there is a featured image.

With the above condition, you can use the other way around to display a default or fallback image when there is NO featured image on the page.

Hope this makes sense.

Thanks @ruenel . On the DIV that show the featured image, i added a condition to that DIV to show the DIV if a featured image is set and then i duplicated that DIV, set it to a static image and set it to show when a featured image is not set and its working beautifully! Thanks for the nudge :slight_smile: Have a great day!

Glad to know this has been resolved! Please feel free to open another thread if you have more questions.

Have a nice day.