Viewing 3 replies - 1 through 3 (of 3 total)
  • This works for me:

    // output header image & text CSS
    if ( !function_exists( 'theme_custom_header_style' ) ) :
    	function theme_custom_header_style() {
    		echo '<style type="text/css" media="screen">'."\n";
    		if( get_header_image() != '' ) echo '#header-image {background-image:url(' . get_header_image() . ');}';
    		if( get_header_textcolor() == 'blank' ) echo '#header h1,#header h1 a {position:absolute;top:-5000px;left:-5000px;}';
    		else echo '#header h1,#header h1 a {color:#' . get_header_textcolor() . ';}';
    		echo "\n</style>\n\n";
    	}
    endif;
    Thread Starter Richard-B

    (@richard-b)

    Esmi thank you so much, with a bit of adjustment that worked great for me too. In the theme i’m working on you can only upload a header image so I changed it to the following.

    <?php if (get_header_image() != '') {?>
    // yes
    <?php } else { ?>
    // no
    <?php } ?>

    Thanks again, I could not have done this without your help!

    No problem. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Check for image header’ is closed to new replies.