forked from TamerShlash/Sampression-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
178 lines (164 loc) · 5.97 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything untill Primary Navigation
*
* @package Sampression-Lite
* @since Sampression Lite 1.0
*/
?>
<!doctype html>
<!--[if IE 6 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<?php
/** sampression hooks **/
// Metas
do_action( 'sampression_meta' );
// Title
do_action( 'sampression_title' );
// Favicons
do_action( 'sampression_favicon' );
// CSS
do_action( 'sampression_styles' );
// Custom header styles
do_action('sampression_custom_header_style');
// Links
do_action( 'sampression_links' );
wp_head();
?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/custom.css" type="text/css" media="all">
</head>
<body <?php body_class('top'); ?>>
<header id="header">
<div class="container">
<div class="columns nine">
<?php
if(!get_option('opt_sam_use_logo') || get_option('opt_sam_use_logo') == 'no') {
do_action('sampression_logo');
}
?>
<div class="logo-txt">
<h1 class="site-title" id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</h1>
<h2 id="site-description" class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>
</div>
<div class="columns seven">
<nav id="top-nav">
<?php
//Check if the Custom Navigation is available
if ( has_nav_menu('top-menu') ) {
wp_nav_menu( array (
'theme_location' => 'top-menu',
'container' => '',
'menu_class' => 'top-menu clearfix',
'depth' => 0, // set to 1 to disable dropdowns
'fallback_cb' => false
));
} else {
// Otherwise list the Pages
?>
<ul class="top-menu clearfix">
<?php wp_list_pages('title_li=&depth=0'); ?>
</ul>
<?php
} ?>
</nav>
<div id="top-nav-mobile">
<?php /* $args = array(
'depth' => 0,
'child_of' => 0,
'selected' => 0,
'echo' => 1,
'name' => 'page_id');
wp_dropdown_pages( $args ); */
?>
</div>
<!-- #top-nav -->
<div id="interaction-sec" class="clearfix <?php echo getnoofclass(); ?>">
<?php get_search_form(); ?>
<ul class="sm-top">
<?php // Being Social
//Facebook
if( get_option( 'opt_get_facebook' ) !=''){ ?>
<li class="sm-top-fb"><a href="<?php echo "https://www.facebook.com/" . stripslashes(get_option( 'opt_get_facebook' )); ?>" target="_blank">Facebook</a></li>
<?php }
// Twitter
if( get_option( 'opt_get_twitter' ) !='') {
?>
<li class="sm-top-tw"><a href="<?php echo "https://www.twitter.com/" . stripslashes(get_option( 'opt_get_twitter') ); ?>" target="_blank">Twitter</a></li>
<?php }
// Google plus
if( get_option( 'opt_get_gplus' ) !='') {
?>
<li class="sm-top-gplus"><a href="<?php echo stripslashes(get_option( 'opt_get_gplus') ); ?>" target="_blank">Google Plus</a></li>
<?php }
// Youtube
if( get_option( 'opt_get_youtube' ) !='' ) {
?>
<li class="sm-top-youtube"><a href="<?php echo stripslashes(get_option( 'opt_get_youtube') ); ?>" target="_blank">YouTube</a></li>
<?php } ?>
</ul>
<!-- .sm-top -->
</div>
<!-- #interaction-sec -->
</div>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php endif; ?>
</div>
</header>
<!-- #header -->
<!-- Filter the Post by Category: We are using Isotop (http://isotope.metafizzy.co/) for Filtering: An exquisite jQuery plugin for magical layouts -->
<?php if(is_home()): ?>
<span id="primary-nav-scroll"></span>
<nav id="primary-nav">
<div class="container">
<a href="#" id="btn-nav-opt">show/hide</a>
<div class="columns sixteen">
<div class="nav-label"><?php _e('Filter By:','sampression'); ?></div>
<ul class="nav-listing clearfix">
<li><a href="#" data-filter="*" class="selected"><span></span><?php _e('Show All','sampression'); ?></a></li>
<?php
/*to exclude some categories */
$args = array();
/* $args = array(
'exclude'=> array( get_cat_ID('aciform'), get_cat_ID('alignment'), get_cat_ID('antiquarianism')) // exclude by category slug
'exclude'=> array( 1, 2, 3) //exclude by category id
); */
$categories = get_categories($args);
$categories = get_categories();
foreach($categories as $category):
?>
<li><a href="javascript:void(0);" data-filter=".<?php echo $category->slug; ?>" id="<?php echo $category->slug; ?>" class="filter-data"><span></span><?php echo $category->name; ?></a></li>
<?php
endforeach;
?>
</ul>
<!-- Check Viewport: If the normal design couldn't fit with viewport, the Categories will appear via CSS with Select Menu form -->
<select name="get-cats" id="get-cats">
<option value="*">Show all</option>
<?php
foreach($categories as $category):
?>
<option value=".<?php echo $category->slug; ?>"><?php echo $category->name; ?></option>
<?php
endforeach;
?>
</select>
</div>
</div>
</nav>
<!-- #primary-nav -->
<?php endif; ?>
<div id="content-wrapper">
<div class="container">