Forked from dbridgman/Wordpress - Pull a post thumbnail, with fallback
Created
October 1, 2015 08:06
-
-
Save joshuacharleslake/c3e9c924e2e5b28af7b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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