forked from pfefferle/autonomie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
64 lines (57 loc) · 2.22 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package ZenPress
* @since ZenPress 1.0.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<link rel="profile" href="http://microformats.org/profile/specs" />
<link rel="profile" href="http://microformats.org/profile/hatom" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?><?php zenpress_semantics( 'body' ); ?>>
<div id="page">
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'zenpress' ); ?>"><?php _e( 'Skip to content', 'zenpress' ); ?></a></div>
<?php do_action( 'before' ); ?>
<header id="site-header" class="site-header">
<div class="site-branding">
<?php
if ( has_custom_logo() ) {
echo get_custom_logo();
}
if ( is_home() ) {
$site_title_element = 'h1';
} else {
$site_title_element = 'div';
}
?>
<<?php echo $site_title_element ?> id="site-title"<?php zenpress_semantics( 'site-title' ); ?>>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"<?php zenpress_semantics( 'site-url' ); ?>>
<?php bloginfo( 'name' ); ?>
</a>
</<?php echo $site_title_element ?>>
<?php get_search_form( true ); ?>
</div>
<nav id="site-navigation" class="site-navigation">
<button class="menu-toggle" aria-controls="site-navigation" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'zenpress' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
<?php if ( is_home() || is_archive() || is_search() || zenpress_has_full_width_featured_image() ) : ?>
<div class="page-banner">
<?php if ( ! is_singular() ) : ?>
<div class="page-branding">
<?php get_template_part( 'templates/partials/page', 'title' ); ?>
<?php get_template_part( 'templates/partials/page', 'description' ); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</header><!-- #site-header -->