header_image()
Displays header image URL.
Uses: get_header_image()
1 time — 0.005023 sec (very slow) | 50000 times — 3.03 sec (fast)
No Hooks.
Return
null
. Nothing (null).
Usage
header_image();
Examples
#1 Display an img image tag for the header
<img src="<?php header_image(); ?>" alt="<?php bloginfo('title'); ?>">
Changelog
Since 2.1.0 | Introduced. |
header_image() header image code WP 6.4.3
function header_image() { $image = get_header_image(); if ( $image ) { echo esc_url( $image ); } }