-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
150 lines (112 loc) · 4.9 KB
/
header.php
File metadata and controls
150 lines (112 loc) · 4.9 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
/**
* The theme's header file that appears on EVERY page.
*
* @since 0.1.0
* @package Mullins
*/
// Don't load directly
if ( ! defined( 'ABSPATH' ) ) {
die;
}
// Start a session to preserve bucket data
if ( ! isset( $_SESSION ) ) {
session_start();
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/vendor/js/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
<?php mullins_template( 'customizer-css' ); ?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper">
<header id="site-header">
<div class = "row">
<div class = "medium-4 small-12 columns">
<div class = "row">
<div class = "small-12 columns">
<h2 class="phone-number text-center"><span class="fa fa-phone"></span> <?php echo get_phone_number_link( get_theme_mod( 'mullins_phone_number', '(517) 867-5309' ) ); ?></h2>
</div>
<div class = "small-12 columns">
<a href="<?php bloginfo( 'url' ); ?>" title = "<?php bloginfo( 'name' ); ?> - Home">
<img src="<?php echo get_theme_mod( 'mullins_logo_image', 'http://placehold.it/350x150' ); ?>" alt = "<?php bloginfo( 'name' ); ?>"/>
</a>
</div>
</div>
</div>
<div class = "medium-8 hide-for-small-only columns">
<?php
global $post;
$first = true;
$testimonials = get_posts( array(
'post_type' => 'mullins_testimonial',
'posts_per_page' => 5,
'post_status' => 'publish',
) );
if ( count( $testimonials ) > 0 ) {
?>
<div class="realbig-slider-container">
<div id="#testimonial" class="realbig-slider testimonials">
<div class="inner">
<?php
foreach ( $testimonials as $post ) {
setup_postdata( $post );
$image_url = wp_get_attachment_url( get_post_thumbnail_id() );
?>
<div class="slide valign-center<?php echo ( ( $first === true ) ? ' active' : '' ); ?>" style = "background-image: url(<?php echo $image_url; ?>)">
<div class="overlay columns">
<blockquote class = "testimonial-copy"><?php the_content(); ?></blockquote>
<h4>— <?php the_title(); ?> —</h4>
</div>
</div>
<?php
$first = false;
}
?>
</div>
<ul class="indicators"></ul>
<a href="#" class="add-testimonial" data-reveal-id="testimonial-modal">Leave Your Own Testimonial</a>
</div>
</div>
<?php
wp_reset_postdata();
}
?>
<?php //echo do_shortcode( '[realbig_slider ids = "12,14" classes = "header-testimonials" arrows = false indicators = false]' ); ?>
</div>
</div>
<div class = "row">
<div class="container small-text-center show-for-medium-up">
<div class="columns small-12">
<nav class="top-nav">
<?php
require_once __DIR__ . '/includes/class-mullins-walker-primarynav.php';
$menu = get_menu_by_location( 'primary' );
$items = wp_get_nav_menu_items( $menu->name );
foreach ( $items as $i => $item ) {
if ( $item->menu_item_parent != '0' ) {
unset( $items[ $i ] );
}
}
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => false,
'depth' => 3,
'walker' => new Mullins_Walker_PrimaryNav( count( $items ) ),
) );
?>
</nav>
</div>
</div>
</div>
</header>
<section id="site-content">