Title: display_header_text
Published: April 25, 2014
Last modified: February 24, 2026

---

# display_header_text(): bool

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#changelog)

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

Whether to display the header text.

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

 bool

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

    ```php
    function display_header_text() {
    	if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) {
    		return false;
    	}

    	$text_color = get_theme_mod( 'header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) );
    	return 'blank' !== $text_color;
    }
    ```

[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#L1204)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/theme.php#L1204-L1211)

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

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

Gets the theme support arguments passed when registering that support.

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

Retrieves theme modification value for the active theme.

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

Checks a theme’s support for a given feature.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/display_header_text/?output_format=md#)

| Used by | Description | 
| [Custom_Image_Header::step_1()](https://developer.wordpress.org/reference/classes/custom_image_header/step_1/)`wp-admin/includes/class-custom-image-header.php` |

Displays first step of custom header image page.

  | 
| [Custom_Image_Header::js_1()](https://developer.wordpress.org/reference/classes/custom_image_header/js_1/)`wp-admin/includes/class-custom-image-header.php` |

Displays JavaScript based on Step 1 and 3.

  |

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

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

## User Contributed Notes

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