Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joshuacharleslake/c3e9c924e2e5b28af7b7 to your computer and use it in GitHub Desktop.
Save joshuacharleslake/c3e9c924e2e5b28af7b7 to your computer and use it in GitHub Desktop.
<div class="post-thumbnail">
//Adjusted the code so it integrates Wordpresses default thumbnail size - This can be changed in Settings -> Media
<?php if ( has_post_thumbnail() ) { the_post_thumbnail('thumbnail'); } else
{ ?>
<img src="<?php bloginfo('template_directory'); ?>/MYIMAGESFILE/MYFEATUREIMAGE.jpg" alt="Post Thumbnail" />
<?php } ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment