Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WordPress blog archive: featured image or static default image
<div class="list-article-thumb">
<a href="<?php echo esc_url( get_permalink() ); ?>">
if ( has_post_thumbnail( ) ) {
} else {
echo '<img alt="" src="'. get_template_directory_uri() . '/images/placeholder.png' .'">';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment