display_header() WordPress Function
The display_header() function is used to display the header of a WordPress site. This function can be used to display the header of a specific page or post, or to display the header of the entire site. The header is typically composed of the site title, site tagline, and navigation menu.
display_header( string $body_classes = '' ) #
Display installation header.
Parameters
- $body_classes
(string)(Optional)
Default value: ''
Source
File: wp-admin/install.php
function display_header( $body_classes = '' ) {
header( 'Content-Type: text/html; charset=utf-8' );
if ( is_rtl() ) {
$body_classes .= 'rtl';
}
if ( $body_classes ) {
$body_classes = ' ' . $body_classes;
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress › Installation' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui<?php echo $body_classes; ?>">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php
} // End display_header().
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |