WordPress at Your Fingertips

has_custom_header() WP 1.0

Check whether a custom header is set or not.

1 time — 0.000148 sec (fast) | 50000 times — 2.97 sec (fast) | PHP 7.1.0, WP 4.7

No Hooks.

Return

true|false. True if a custom header is set. False if not.

Usage

has_custom_header();

Changelog

Since 4.7.0 Introduced.

Code of has_custom_header() WP 5.8

<?php
function has_custom_header() {
	if ( has_header_image() || ( has_header_video() && is_header_video_active() ) ) {
		return true;
	}

	return false;
}

From tag: custom_header (theme options: video color image)

More from tag: Conditional tags (all)

More from category: Settings (customizer)

No comments
    Log In