Created
August 2, 2017 14:48
-
-
Save Hexodus/e7703df365bec69097179e784b8e8225 to your computer and use it in GitHub Desktop.
Wordpress. Method to get the site features image instead of the loop ones. Useful for blogs where usually the_post_thumbnail() would call the first loop image thumbnail.
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
<?php | |
$img = wp_get_attachment_image_src(get_post_thumbnail_id(get_option('page_for_posts')),'full'); | |
$featured_image = $img[0]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment