Title: has_header_image
Published: April 23, 2015
Last modified: February 24, 2026

---

# has_header_image(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#see-also)
 * [Return](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#wp--skip-link--target)

Checks whether a header image is set or not.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#see-also)󠁿

 * [get_header_image()](https://developer.wordpress.org/reference/functions/get_header_image/)

## 󠀁[Return](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#return)󠁿

 bool Whether a header image is set or not.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#source)󠁿

    ```php
    function has_header_image() {
    	return (bool) get_header_image();
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/theme.php#L1222)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/theme.php#L1222-L1224)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#related)󠁿

| Uses | Description | 
| [get_header_image()](https://developer.wordpress.org/reference/functions/get_header_image/)`wp-includes/theme.php` |

Retrieves header image for custom header.

  |

| Used by | Description | 
| [has_custom_header()](https://developer.wordpress.org/reference/functions/has_custom_header/)`wp-includes/theme.php` |

Checks whether a custom header is set or not.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.2.0](https://developer.wordpress.org/reference/since/4.2.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/has_header_image/?output_format=md#comment-content-2355)
 2.   [Anthony Hortin](https://profiles.wordpress.org/ahortin/)  [  9 years ago  ](https://developer.wordpress.org/reference/functions/has_header_image/#comment-2355)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fhas_header_image%2F%23comment-2355)
    Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fhas_header_image%2F%23comment-2355)
 4. Related:
 5. [header_image](https://developer.wordpress.org/reference/functions/header_image/)
    
    [get_header_image](https://developer.wordpress.org/reference/functions/get_header_image/)
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fhas_header_image%2F%3Freplytocom%3D2355%23feedback-editor-2355)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fhas_header_image%2F)
before being able to contribute a note or feedback.