Check for image header
-
Does anyone know if it is possible to check if the theme has an image header selected in the admin? I have added the new header support (from this tutorial https://www.wpbeginner.com/wp-themes/how-to-enable-custom-header-images-panel-in-wordpress-3-0/)
I thought it might be something like this, apparently its not that simple though ??
<?php if ( header_image ()) { ?> // do stuff <img src="<?php header_image(); ?>" alt="" /> <?php } else { ?> // do something else <?php } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Check for image header’ is closed to new replies.