-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
164 lines (156 loc) · 6.83 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
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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Starkers
* @since Starkers 3.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'>
<title><?php
/*
* Print the <title> tag based on what is being viewed.
* We filter the output of wp_title() a bit -- see
* twentyten_filter_wp_title() in functions.php.
*/
wp_title( '|', true, 'right' );
?></title>
<link rel="shortcut icon" href="<?php bloginfo( 'template_directory' ); ?>/favicon.ico" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/_css/styles.css">
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/_css/ie.css" />
<script src="<?php bloginfo( 'template_directory' ); ?>/_js/libs/respond.min.js"></script>
<![endif]-->
<!--[if gt IE 8]>
<link rel="stylesheet" media="all" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/_css/ie+.css" />
<![endif]-->
<script src="<?php bloginfo( 'template_directory' ); ?>/_js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
<!--TYPEKIT-->
<script type="text/javascript" src="http://use.typekit.com/jdf6wuh.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<?php
/* Get the Page Slug to Use as a Body Class, this will only return a value on pages! */
$class = '';
/* is it a page */
if( is_page() ) {
global $post;
/* Get an array of Ancestors and Parents if they exist */
$parents = get_post_ancestors( $post->ID );
/* Get the top Level page->ID count base 1, array base 0 so -1 */
$id = ($parents) ? $parents[count($parents)-1]: $post->ID;
/* Get the parent and set the $class with the page slug (post_name) */
$parent = get_page( $id );
$class = $parent->post_name;
}
?>
<body <?php body_class( $class ); ?>>
<!-- Google Code for Phone Call Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
goog_snippet_vars = function() {
var w = window;
w.google_conversion_id = 1064381838;
w.google_conversion_label = "isxGCJaA_gMQjtvE-wM";
w.google_conversion_value = 0;
}
// DO NOT CHANGE THE CODE BELOW.
goog_report_conversion = function(url) {
goog_snippet_vars();
window.google_conversion_format = "3";
window.google_is_call = true;
var opt = new Object();
opt.onload_callback = function() {
if (typeof(url) != 'undefined') {
window.location = url;
}
}
var conv_handler = window['google_trackConversion'];
if (typeof(conv_handler) == 'function') {
conv_handler(opt);
}
}
/* ]]> */
</script>
<style>
.print_logo {display:none;}
@media print {
.container-col1.clearfix {margin-top: -80px;}
.product_count {display:none;}
.print_logo {display:block;padding: 0 2% 0px 2%;}
.print_logo h1 {text-align: right; font-style:italic}
}
</style>
<div class='print_logo'>
<img src="<?php bloginfo( 'template_directory' ); ?>/_img/print_logo.png" alt="Pipeline Packaging" title="Pipeline Packaging" />
</div>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion_async.js"></script>
<header>
<div class="full-width clearfix colorbar">
<div id="header-container" class="container">
<div id="mobile-header">
<b>Contact Us</b> - <a onclick="goog_report_conversion('tel:1-877-242-1880')" href="tel:1-877-242-1880" >1.877.242.1880</a>
</div>
<div id="top-links-container">
<ul>
<li><a href="http://pipelinepackaging.com/products/my-briefcase/" class="top-link my-briefcase"><i class="icon-briefcase icon-large"></i><span>My Briefcase</span></a></li>
<li><a href="http://pipelinepackaging.com/get-in-touch/" class="top-link contact-us"><i class="icon-envelope-alt icon-large"></i><span>Contact Us</span></a></li>
<li><a href="http://pipelinepackaging.com/who-we-are/about-pipeline/" class="top-link about-us"><i class="icon-info-sign icon-large"></i><span>About Us</span></a></li>
<li><a href="#" class="top-link phone"><i class="icon-phone icon-large"></i><span>877.242.1880</span></a></li>
<li><a href="/products/product-overview" class="top-link products"><i class="icon-shopping-cart icon-large"></i><span>Search Products</span></a></li>
<li><form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<span class="top-link search">
<i class="icon-search icon-large"></i>
<span><?php get_search_form(); ?> <a href="#" class="search-submit-link" title="submit"></a> </span>
</span>
</form>
</li>
<li class="social"><a href="javascript:void(0)" class="top-link social-icon" onclick="$('.st_twitter_large span span.stLarge')[0].click()"><i class="icon-twitter-sign icon-large"></i><span>Tweet</span></a></li>
<li class="social"><a href="javascript:void(0)" class="top-link social-icon" onclick="$('.st_facebook_large span span.stLarge')[0].click()"><i class="icon-facebook-sign icon-large"></i><span>Share</span></a></li>
<li class="social"><a href="javascript:void(0)" class="top-link social-icon" onclick="$('.st_linkedin_large span span.stLarge')[0].click()"><i class="icon-linkedin-sign icon-large"></i><span>Share</span></a></li>
</ul>
</div>
<div id="logo-container" class="span_5">
<a href="<?php echo home_url(); ?>">
<img src="<?php bloginfo( 'template_directory' ); ?>/_img/logo@2x.png" alt="Pipeline Packaging" title="Pipeline Packaging" />
</a>
</div>
<div id="nav-container" class="span_11">
<div id="mobile-nav">
<form id="mobile-drop-down-form" action="" method="post">
<select id="mobile-drop-down">
<option value="" class="default-option">Select a menu item</option>
<?php
$menu = wp_nav_menu(array('theme_location' => 'mobile', 'echo' => false));
if (preg_match_all('#(<a [^<]+</a>)#',$menu,$matches)) {
$hrefpat = '/(href *= *([\"\']?)([^\"\' ]+)\2)/';
foreach ($matches[0] as $link) {
// Do something with the link
if (preg_match($hrefpat,$link,$hrefs)) {
$href = $hrefs[3];
}
if (preg_match('#>([^<]+)<#',$link,$names)) {
$name = $names[1];
}
echo "<option value=\"$href\">$name</option>";
}
}
?>
</select>
</form>
</div>
<nav>
<?php wp_nav_menu( array( 'container'=>'false', 'theme_location' => 'primary' ) ); ?>
</nav>
</div>
</div>
</div>
</header>