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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<?php offshore_html_before(); ?>
<html <?php language_attributes(); ?>>
<head>
<?php
offshore_head_top();
offshore_head_bottom();
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<?php offshore_body_top(); ?>
<!-- Page Wrapper -->
<div class="wrapper">
<?php offshore_header_before(); ?>
<!-- Header Section -->
<header>
<div class="header-area">
<?php
offshore_header_top();
if( isset( $post->ID ) ){
$meta = get_post_meta( $post->ID, 'offshore_options', true );
} else {
$meta = array();
}
?>
<!-- Top Contact Info -->
<div class="row logo-top-info">
<div class="container">
<div class="col-md-3 logo">
<!-- Main Logo -->
<?php
if( get_theme_mod( 'custom_logo' ) ) {
echo '<div itemscope>';
offshore_the_custom_logo();
echo '</div>';
}
$title = get_bloginfo( 'title', 'display' );
$description = get_bloginfo( 'description', 'display' );
if( get_theme_mod( 'header_textcolor' ) != 'blank' ){
$display = '';
} else {
$display = ' hidden';
}
if( display_header_text() ) {
if ( is_front_page() ) {
echo '<h1 class="site-title' . esc_attr( $display ) . '"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html( get_bloginfo( 'name' ) ) . '</a></h1>';
} else {
echo '<p class="site-title' . esc_attr( $display ) . '"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html( get_bloginfo( 'name' ) ) . '</a></p>';
}
if ( $description ) {
echo '<p class="site-description' . esc_attr( $display ) . '">' .
wp_kses( $description, array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array(),
)
) .
'</p>';
}
}
?>
<!-- Responsive Toggle Menu -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only"><?php esc_html_e( 'Main Menu', 'offshore' ); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="col-md-9 top-info-social">
<div class="pull-right">
<div class="top-widgets">
<?php
if( !isset( $meta['hide_header_widgets'] ) ){
$meta['hide_header_widgets'] = 'global';
}
// Hide / Display header widgets
if( '0' == get_theme_mod( 'hide_header_widgets', '0' ) && $meta['hide_header_widgets'] == 'global' ){
if ( is_active_sidebar( 'offshore_top_widgets' ) ){
dynamic_sidebar( 'offshore_top_widgets' );
}
} elseif( $meta['hide_header_widgets'] == 'no' ) {
if ( is_active_sidebar( 'offshore_top_widgets' ) ){
dynamic_sidebar( 'offshore_top_widgets' );
}
}
?>
</div>
</div>
</div>
</div>
</div>
<!-- Main Navigation Section -->
<?php
$navbar_default = array(
'menu_class' => 'main-menu',
'container' => 'nav',
'container_class' => 'collapse navbar-collapse main-menu',
'container_id' => 'navbar',
'theme_location' => 'primary',
'walker' => new offshore_bootstrap_navwalker(),
'items_wrap' => '<div class="container"><ul id="%1$s" class="%2$s">%3$s</ul></div>'
);
// Override menu based on page options
// if( isset( $meta['main_menu'] ) && is_numeric( $meta['main_menu'] ) ) {
// $navbar_default[ 'menu' ] = $meta['main_menu'];
// }
// Hide / Display main menu
// if( isset( $meta['hide_menu'] ) && $meta['hide_menu'] != 'yes' || !isset( $meta['hide_menu'] ) ) {
// wp_nav_menu( $navbar_default );
// }
//
wp_nav_menu( $navbar_default );
offshore_header_bottom();
?>
</div>
</header>
<!-- Header Section -->
<?php offshore_header_after(); ?>
<!-- Main Content Section -->
<main class="main">
<?php
if( !isset( $meta['hide_title_area'] ) ){
$meta['hide_title_area'] = 'global';
}
// Hide / Display title area
if( '0' == get_theme_mod( 'hide_title_area', '0' ) && $meta['hide_title_area'] == 'global' || $meta['hide_title_area'] == 'no' ){
get_template_part( 'parts/part', 'title' );
}
// get_template_part( 'parts/header', 'image' );
if( !isset( $meta['template'] ) ){
$meta['template'] = 'global';
}
$container = 'container';
// Set page template to full width
if( 'full-width' == get_theme_mod( 'page_template', 'right-sidebar' ) && $meta['template'] == 'global' ){
$container = 'full-width';
} elseif( $meta['template'] == 'full-width' ) {
$container = 'full-width';
}
offshore_content_before();
?>
<!-- Main Container -->
<div class="<?php echo $container; ?>">