forked from openknowledge-archive/wordpress-theme-with-bp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·117 lines (111 loc) · 3.94 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
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package OKFNWP
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/favicon.ico" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
<style type="text/css">
<?php if ( "true" == get_option('okfnwp_admin_bar', "true") ) { ?>
#wpadminbar {display:none; }
html {margin-top: 0px !important; }
<?php } ?>
</style>
</head>
<body <?php body_class(); ?>>
<?php do_action('okf_panel'); ?>
<header class="header">
<div class="container">
<div class="row">
<div id="header-brand">
<a href="/">
<h1><?php echo bloginfo('name'); ?></h1>
</a>
</div>
<nav id="header-nav" role="navigation" class="hidden-xs">
<div id="nav-social" class="social-links">
<a class="facebook" href="https://www.facebook.com/<?php echo get_option('okfnwp_fb_id', 'OKFNetwork'); ?>"><i class="fa fa-facebook fa-lg"></i></a>
<a class="twitter" href="https://twitter.com/<?php echo get_option('okfnwp_twitter_id', 'okfn'); ?>"><i class="fa fa-twitter fa-lg"></i></a>
</div>
</nav>
</div>
<div class="okfn-wp-ribbon">
<a href="#" data-toggle="collapse" data-target="#okf-panel" title="Part of the Open Knowledge Foundation Network">An Open Knowledge Foundation Site</a>
</div>
</div>
</header>
<nav id="navbar-main" class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-main-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand visible-xs" href="#">Menu</a>
</div>
<div id="navbar-main-collapse" class="collapse navbar-collapse">
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'menu_class' => 'nav navbar-nav',
'container' => '',
'fallback_cb' => false
));
?>
<form class="navbar-form navbar-right" action="<?php echo home_url(); ?>/" method="get" role="search">
<div class="input-group input-group-search">
<input type="text" name="s" class="form-control" value="<?php the_search_query(); ?>">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="fa fa-lg fa-search"></span>
<span class="sr-only">Submit</span>
</button>
</span>
</div>
</form>
</div>
</div>
</nav>
<?php if(get_header_image() && is_front_page()) : ?>
<section class="carousel" style="background-image:url(<?php header_image(); ?>)">
<img src="<?php header_image(); ?>" alt="">
</section>
<?php else : ?>
<div id="page-banner">
<div class="container">
<h1>
<?php
if(is_single() || is_page()) :
the_title();
elseif(is_archive() || is_category() || is_home()) :
echo __('Blog', 'okfnwp');
elseif(is_404()) :
echo __('Page Not Found', 'okfnwp');
elseif(is_search()) :
echo sprintf(__('Search Results for: %1$s', 'okfnwp'), get_search_query());
endif;
?>
</h1>
</div>
</div>
<div id="breadcrumb" role="navigation">
<div class="container">
<?php breadcrumbs(); ?>
</div>
</div>
<?php endif; ?>
<main class="content"><div class="container">
<div class="row">