| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The header for our theme. |
|---|
| 4 | * |
|---|
| 5 | * @package Square |
|---|
| 6 | */ |
|---|
| 7 | ?> |
|---|
| 8 | <!DOCTYPE html> |
|---|
| 9 | <html <?php language_attributes(); ?>> |
|---|
| 10 | |
|---|
| 11 | <head> |
|---|
| 12 | <meta charset="<?php bloginfo('charset'); ?>"> |
|---|
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
|---|
| 14 | |
|---|
| 15 | <?php wp_head(); ?> |
|---|
| 16 | </head> |
|---|
| 17 | |
|---|
| 18 | <body <?php body_class(); ?>> |
|---|
| 19 | <?php wp_body_open(); ?> |
|---|
| 20 | <div id="sq-page"> |
|---|
| 21 | <a class="skip-link screen-reader-text" href="#sq-content"><?php esc_html_e('Skip to content', 'square'); ?></a> |
|---|
| 22 | <?php |
|---|
| 23 | $square_header_bg = get_theme_mod('square_header_bg', 'sq-black'); |
|---|
| 24 | $square_sticky_header = get_theme_mod('square_disable_sticky_header'); |
|---|
| 25 | $square_sticky_header_class = ($square_sticky_header) ? ' disable-sticky' : ''; |
|---|
| 26 | ?> |
|---|
| 27 | <header id="sq-masthead" class="sq-site-header <?php echo esc_attr($square_header_bg . $square_sticky_header_class); ?>"> |
|---|
| 28 | <div class="sq-container"> |
|---|
| 29 | <div id="sq-site-branding"> |
|---|
| 30 | <?php |
|---|
| 31 | if (function_exists('has_custom_logo') && has_custom_logo()) { |
|---|
| 32 | the_custom_logo(); |
|---|
| 33 | } elseif (get_header_image()) { |
|---|
| 34 | ?> |
|---|
| 35 | <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"> |
|---|
| 36 | <img src="<?php header_image(); ?>" alt="<?php bloginfo('name'); ?>"> |
|---|
| 37 | </a> |
|---|
| 38 | <?php } else { ?> |
|---|
| 39 | <?php if (is_front_page()) { ?> |
|---|
| 40 | <h1 class="sq-site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1> |
|---|
| 41 | <?php } else { ?> |
|---|
| 42 | <p class="sq-site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p> |
|---|
| 43 | <?php } ?> |
|---|
| 44 | <p class="sq-site-description"><?php bloginfo('description'); ?></p> |
|---|
| 45 | <?php } // End header image check. ?> |
|---|
| 46 | </div><!-- .site-branding --> |
|---|
| 47 | |
|---|
| 48 | <a href="#" class="sq-toggle-nav"> |
|---|
| 49 | <span></span> |
|---|
| 50 | </a> |
|---|
| 51 | |
|---|
| 52 | <nav id="sq-site-navigation" class="sq-main-navigation"> |
|---|
| 53 | <?php |
|---|
| 54 | wp_nav_menu(array( |
|---|
| 55 | 'theme_location' => 'primary', |
|---|
| 56 | 'container_class' => 'sq-menu sq-clearfix', |
|---|
| 57 | 'menu_class' => 'sq-clearfix', |
|---|
| 58 | 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|---|
| 59 | )); |
|---|
| 60 | ?> |
|---|
| 61 | </nav><!-- #site-navigation --> |
|---|
| 62 | </div> |
|---|
| 63 | </header><!-- #masthead --> |
|---|
| 64 | |
|---|
| 65 | <div id="sq-content" class="sq-site-content sq-clearfix"> |
|---|