-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
executable file
·148 lines (147 loc) · 4.3 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
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>
<?php if (is_home () ) { bloginfo('name'); echo " - "; bloginfo('description');
} elseif (is_category() ) {single_cat_title(); echo " - "; bloginfo('name');
} elseif (is_single() || is_page() ) {single_post_title(); echo " - "; bloginfo('name');
} elseif (is_search() ) {bloginfo('name'); echo " search results: "; echo esc_html($s);
} else { wp_title('',true); }?>
</title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--
*********************************************************************
************ STYLES ENQUED IN FUNCTIONS.PHP *************************
*********************************************************************
-->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!-- ****************** WP HEAD *************************-->
<?php wp_head(); ?>
<script type="text/javascript">
fbg.hideFOUT('asap');
</script>
<?php
// marketplace id = 1163
// leaders id = 1148
// nonbelievers id = 1162
// parents id = 1149
// pastors-teachers id =1166
$category = get_the_category(); //get the category of the post
$catID = $category[0]->slug; //find the id
//marketplace
if ($catID == 'students' || $catID == 'monday-student-focus' ) : ?>
<style type="text/css">
/* <?php echo $category[0]->slug ?>*/
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/businessHeader.jpg) no-repeat center top;
}
.marketBlurb, .mComInfo {
display: block;
}
</style>
<?php
// leaders
elseif ($catID == 'leaders' || $catID == 'tuesday-pastor-teacher-focus' || $catID == 'pastors-teachers') :?>
<style type="text/css">
/* <?php echo $category[0]->slug ?>*/
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/pastorHeader.jpg) no-repeat center top;
}
.leadersBlurb, .lComInfo {
display: block;
}
</style>
<?php
// pastors-teachers
elseif ($catID == 'pastors-teachers') :?>
<style type="text/css">
/* <?php echo $category[0]->slug ?>*/
/*header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/pastorHeader.jpg) no-repeat center top;
}
.leadersBlurb, .lComInfo {
display: block;
}
*/</style>
<?php
//nonbelievers
elseif ($catID == 'nonbelievers') :?>
<style type="text/css">
/* <?php echo $category[0]->slug ?>*/
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/thinkerHeader.jpg) no-repeat center top;
}
.unbelieversBlurb, .uComInfo {
display: block;
}
</style>
<?php
//parents
elseif ($catID == 'parents' || $catID =='friday-parent-focus') :
?>
<style type="text/css">
/* <?php echo $category[0]->slug ?>*/
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/familyHeader.jpg) no-repeat center top;
}
.parentsBlurb, .pComInfo {
display: block;
}
</style>
<?php
else :?>
<style type="text/css">
<?php
// echo $category[0]->slug
?>
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/homeHeader.jpg) no-repeat center top;
}
.blurbs {
display: none;
}
</style>
<?php endif; ?>
<?php if (is_home()) :?>
<style type="text/css">
header {
background: url(<?php echo get_template_directory_uri() ;
?>/images/homeHeader.jpg) no-repeat center top;
}
.blurbs, .comInfo {
display: none;
}
</style>
<?php endif; ?>
</head>
<body <?php body_class(); ?> >
<nav class="navGeneral">
<?php wp_nav_menu( array( 'container_class' => 'menu', 'theme_location' => 'generalNav' ) ); ?>
</nav>
<div class="container">
<header>
<hgroup class="headText">
<h1 class="blogTitle"><a href="<?php echo home_url(); ?>">
<?php bloginfo('name'); ?>
</a></h1>
<!--blog name and link to home page-->
<h1 id="tagLine" class="normal">
<?php bloginfo('description'); ?>
</h1>
<!--tagline-->
</hgroup>
<nav class="nav">
<?php wp_nav_menu( array( 'container_class' => 'menu', 'theme_location' => 'primary' ) ); ?>
</nav>
</header>