I have a banner image that appears on Pages that I want. However, I also have a Page designated as a Blog where it doesn't appear. Is there any way to have this banner appear on a Page that is using a blog template? Tried messing around with adding is_home()
or is_page( $id )
to code below but I'm grasping at straws, appreciate your thoughts
//* Add Header Images on Posts/Pages
add_image_size( 'header-img', 1600);
add_action('after_header', 'site_banner', 0);
function site_banner(){
if( !is_singular( 'page' ) )
return;
if( has_post_thumbnail() && is_page() ) :
$ftbanner = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'header-img' );
$banner = $ftbanner[0];
echo '<div id="site-banner" class="site-banner">' . "\n";
echo '<img src="' . $banner . '">' . "\n";
echo '</div>' . "\n";
endif;
}