Created
December 4, 2018 23:11
-
-
Save greghunt/30fb3e61df4255ccafe458ea23d84e40 to your computer and use it in GitHub Desktop.
WordPress Featured Image Src
This file contains hidden or 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
<?php | |
function featuredImageSrc( $post = null, $size = 'featured' ) { | |
if( is_null($post) ) { | |
global $post; | |
} | |
return get_the_post_thumbnail_url( $post, $size ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment