WordPress.org

Ready to get started?Download WordPress

Codex

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

Difference between revisions of "Function Reference/get header image"

m (Source File)
(http://core.trac.wordpress.org/ticket/25420)
Line 14: Line 14:
   
 
== Return Values ==
 
== Return Values ==
; (string) : Returns header image path.
+
; (string) : Returns header image URL.
   
 
An empty string will be returned if:
 
An empty string will be returned if:

Revision as of 10:51, 26 September 2013

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.