header_image() WordPress Function

The header_image() function allows you to display a custom header image on your WordPress site. You can upload your own image, or choose from a selection of built-in images. If you don't set a custom header image, the default image will be used.

header_image() #

Displays header image URL.


Source

File: wp-includes/theme.php

function header_image() {
	$image = get_header_image();

	if ( $image ) {
		echo esc_url( $image );
	}
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More