Created
March 16, 2022 23:22
-
-
Save BenSibley/47af6ec9b9cde32384ea83da5d14569d to your computer and use it in GitHub Desktop.
Output Featured Image on blog page
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
function ct_period_blog_featured_image(){ | |
if ( is_home() ) { | |
echo '<div class="featured-image">'. get_the_post_thumbnail( get_queried_object()->ID, 'full' ) . '</div>'; | |
} | |
} | |
add_action('main_top', 'ct_period_blog_featured_image'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment