the_header_image_tag() WordPress Function

The the_header_image_tag() function is used to display the header image on a Wordpress site. This function will retrieve the header image from the theme's header.php file and display it on the front end of the site. The the_header_image_tag() function can be used with or without arguments. When used without arguments, the function will display the header image set in the theme's header.php file. When used with arguments, the function will display the header image set in the theme's header.php file. The first argument is the size of the header image, and the second argument is the class of the header image.

the_header_image_tag( array $attr = array() ) #

Displays the image markup for a custom header image.


Parameters

$attr

(array)(Optional) Attributes for the image markup.

Default value: array()


Top ↑

Source

File: wp-includes/theme.php

function the_header_image_tag( $attr = array() ) {
	echo get_header_image_tag( $attr );
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.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