WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get header image

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.
  • The user has selected the "Remove Header Image" option from the Appearance -> Header screen.

Examples

Notes

  • Uses: HEADER_IMAGE

Change Log

Since: 2.1.0

Source File

get_header_image() is located in wp-includes/theme.php.

Related

See also index of Function Reference and index of Template Tags.