I'm currently using the_post_thumbnail(); to display featured images in my pages.
Is it possible to set a fallback placeholder image in the event a featured image hasn't been set?
You can use has_post_thumbnail()
as condition and change output accordingly.
Example from Codex:
if(has_post_thumbnail()) {
the_post_thumbnail();
} else {
echo '<img src="'.get_bloginfo("template_url").'/images/img-default.png" />';
}
the_post_thumbnail
across the site?
post_thumbnail_html
filter.