2014-12-10 11:36:38 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2019-11-14 17:16:31 +00:00
|
|
|
* The header for our theme
|
2014-12-10 11:36:38 +00:00
|
|
|
*
|
|
|
|
* Displays all of the <head> section and everything up till <div id="content">
|
|
|
|
*
|
|
|
|
* @package understrap
|
|
|
|
*/
|
2016-11-15 11:09:46 +00:00
|
|
|
|
2019-06-20 08:57:12 +00:00
|
|
|
// Exit if accessed directly.
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
2018-09-10 21:59:04 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
$container = get_theme_mod( 'understrap_container_type' );
|
|
|
|
?>
|
2016-11-01 15:25:21 +00:00
|
|
|
<!DOCTYPE html>
|
2014-12-10 11:36:38 +00:00
|
|
|
<html <?php language_attributes(); ?>>
|
|
|
|
<head>
|
2016-11-21 18:47:05 +00:00
|
|
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
2017-08-14 03:49:16 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
2016-11-21 18:47:05 +00:00
|
|
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
|
|
|
<?php wp_head(); ?>
|
2014-12-10 11:36:38 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body <?php body_class(); ?>>
|
2019-05-03 06:33:40 +00:00
|
|
|
<?php do_action( 'wp_body_open' ); ?>
|
2018-10-12 14:32:32 +00:00
|
|
|
<div class="site" id="page">
|
2016-11-01 15:25:21 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
<!-- ******************* The Navbar Area ******************* -->
|
2018-03-21 04:24:05 +00:00
|
|
|
<div id="wrapper-navbar" itemscope itemtype="http://schema.org/WebSite">
|
2014-12-10 11:36:38 +00:00
|
|
|
|
2018-09-02 17:30:14 +00:00
|
|
|
<a class="skip-link sr-only sr-only-focusable" href="#content"><?php esc_html_e( 'Skip to content', 'understrap' ); ?></a>
|
2015-08-12 15:21:46 +00:00
|
|
|
|
2019-12-13 07:30:59 +00:00
|
|
|
<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label">
|
2019-12-03 07:50:22 +00:00
|
|
|
|
2019-12-13 07:26:10 +00:00
|
|
|
<h2 id="main-nav-label" class="sr-only">
|
2019-12-03 07:50:22 +00:00
|
|
|
<?php esc_html_e( 'Main Navigation', 'understrap' ); ?>
|
|
|
|
</h2>
|
2014-12-10 11:36:38 +00:00
|
|
|
|
2017-01-19 10:29:07 +00:00
|
|
|
<?php if ( 'container' == $container ) : ?>
|
2019-01-04 09:50:50 +00:00
|
|
|
<div class="container">
|
2017-01-19 10:29:07 +00:00
|
|
|
<?php endif; ?>
|
2017-01-06 19:30:34 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
<!-- Your site title as branding in the menu -->
|
|
|
|
<?php if ( ! has_custom_logo() ) { ?>
|
2017-01-24 07:47:53 +00:00
|
|
|
|
|
|
|
<?php if ( is_front_page() && is_home() ) : ?>
|
|
|
|
|
2018-03-02 16:27:12 +00:00
|
|
|
<h1 class="navbar-brand mb-0"><a rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" itemprop="url"><?php bloginfo( 'name' ); ?></a></h1>
|
2018-04-16 21:28:31 +00:00
|
|
|
|
2017-01-24 07:47:53 +00:00
|
|
|
<?php else : ?>
|
|
|
|
|
2018-03-02 16:27:12 +00:00
|
|
|
<a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" itemprop="url"><?php bloginfo( 'name' ); ?></a>
|
2018-04-16 21:28:31 +00:00
|
|
|
|
2017-01-24 07:47:53 +00:00
|
|
|
<?php endif; ?>
|
2018-04-16 21:28:31 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
<?php } else {
|
|
|
|
the_custom_logo();
|
2017-01-06 19:09:14 +00:00
|
|
|
} ?><!-- end custom logo -->
|
2014-12-19 09:04:55 +00:00
|
|
|
|
2018-08-20 16:56:15 +00:00
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="<?php esc_attr_e( 'Toggle navigation', 'understrap' ); ?>">
|
2017-08-18 07:52:07 +00:00
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
<!-- The WordPress Menu goes here -->
|
|
|
|
<?php wp_nav_menu(
|
|
|
|
array(
|
|
|
|
'theme_location' => 'primary',
|
2017-01-06 18:51:53 +00:00
|
|
|
'container_class' => 'collapse navbar-collapse',
|
2017-01-06 19:09:14 +00:00
|
|
|
'container_id' => 'navbarNavDropdown',
|
2018-07-03 06:44:04 +00:00
|
|
|
'menu_class' => 'navbar-nav ml-auto',
|
2016-11-21 18:47:05 +00:00
|
|
|
'fallback_cb' => '',
|
|
|
|
'menu_id' => 'main-menu',
|
2018-04-16 21:28:31 +00:00
|
|
|
'depth' => 2,
|
2018-04-17 16:10:40 +00:00
|
|
|
'walker' => new Understrap_WP_Bootstrap_Navwalker(),
|
2016-11-21 18:47:05 +00:00
|
|
|
)
|
|
|
|
); ?>
|
2017-01-19 10:29:07 +00:00
|
|
|
<?php if ( 'container' == $container ) : ?>
|
2017-01-06 19:30:34 +00:00
|
|
|
</div><!-- .container -->
|
2017-01-19 10:29:07 +00:00
|
|
|
<?php endif; ?>
|
2014-12-19 09:04:55 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
</nav><!-- .site-navigation -->
|
2014-12-19 09:04:55 +00:00
|
|
|
|
2018-03-21 04:24:05 +00:00
|
|
|
</div><!-- #wrapper-navbar end -->
|