Skip to content

Snippet: Display Full Featured Image At The Top of Posts

function my_page_featured_image() {
	if ( is_singular( 'post' ) && has_post_thumbnail() ) {
		echo '<div class="myprefix-large-featured-image clr">'. get_the_post_thumbnail( '', 'full' ) .'</div>';
	}
}
add_action( 'wpex_hook_main_top', 'my_page_featured_image' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top