• I am trying to create a widget that uses get_recent_posts to pull in some images for a mega menu. The problem is that if a post doesn’t have a featured image, then it will look a bit off….

    So, I want to create a fallback, somehow.

    The function has_post_thumbnail does what I need it do, but that only works inside the loop….

    Anybody have a way I can add a fallback to get_recent_posts to default to another image if there is no featured image in the post?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get recent posts: Image fallback?’ is closed to new replies.