-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
83 lines (73 loc) · 2.84 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package rula_imprinting_canada
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<?php if ( get_theme_mod('ga_property_id') ) : ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo get_theme_mod('ga_property_id'); ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?php echo get_theme_mod('ga_property_id'); ?>');
</script>
<?php endif; ?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<img class="body-bg" src="/wp-content/themes/rula_imprinting_canada/images/background-table.jpg">
<div class="container">
<div class="row">
<div class="col">
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'rula_imprinting_canada' ); ?></a>
<nav id="site-navigation" class="main-navigation">
<button class="menu-toggle open-menu" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( '', 'rula_imprinting_canada' ); ?></button>
<div class="navigation-container">
<?php
wp_nav_menu( array(
'theme_location' => 'primary-navigation',
'container' => false
) );
?>
<?php $chapters_query = new WP_Query(array('post_type' => 'page', 'posts_per_page' => -1, 'order' => 'ASC', 'orderby' => 'menu_order', 'depth' => 1, 'meta_key' => '_wp_page_template', 'meta_value' => 'chapter.php' )); ?>
<?php if ( $chapters_query->have_posts() ) : ?>
<div class="content-navigation">
<div class="h1">Chapters</div>
<ul>
<?php while ( $chapters_query->have_posts() ) : $chapters_query->the_post(); ?>
<li>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<ul>
<li><a href="<?php the_permalink() ?>essays">Essays</a></li>
<li><a href="<?php the_permalink() ?>case-studies">Case Studies</a></li>
</ul>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php endif ?>
<?php wp_reset_postdata(); ?>
<?php
wp_nav_menu( array(
'theme_location' => 'secondary-navigation',
'container' => false
) );
?>
<button class="menu-toggle close-menu" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Close', 'rula_imprinting_canada' ); ?></button>
</div>
</nav><!-- #site-navigation -->
<div id="content" class="site-content">