Languages:
English •
Italiano •
(Add your language)
Description
Retrieve header image for custom header.
Usage
<?php get_header_image(); ?>
Parameters
None.
Return Values
- (string)
- Returns header image URL.
An empty string will be returned if:
- The current theme does NOT support header images. (Learn how to enable it in Custom Headers page).
- The current theme DOES support header images. However, the user has selected the "Remove Header Image" option from the Appearance -> Header screen.
Examples
<img src="<?php echo( get_header_image() ); ?>" alt="<?php echo( get_bloginfo( 'title' ) ); ?>" />
Notes
Change Log
Since: 2.1.0
Source File
get_header_image() is located in wp-includes/theme.php
.
Related