forked from aptiko/wordpress-bootstrap3-minimal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
82 lines (74 loc) · 2.58 KB
/
header.php
File metadata and controls
82 lines (74 loc) · 2.58 KB
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
<!DOCTYPE html>
<meta name="viewport" content="width=device-width">
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s'), max( $paged, $page ) );
?></title>
<?php
$color_scheme = get_theme_mod("color_scheme");
if (! $color_scheme) {
$color_scheme = "red";
}
?>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri() . "/style-" . $color_scheme . ".css"; ?>" />
<?php
wp_head();
wp_enqueue_script('bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', array('jquery'));
?>
<?php
switch ($color_scheme) {
case "red": $navbar_style = "inverse"; break;
default: $navbar_style = $color_scheme; break;
}
?>
<header id="top" class="bs-docs-nav navbar navbar-static-top">
<nav class='navbar <?php echo "navbar-" . $navbar_style; ?>' role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-details" aria-expanded="false">
<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" href="<?php echo home_url('/'); ?>"><?php echo bloginfo('name'); ?></a>
</div>
<div id="navbar-details" class='collapse navbar-collapse'>
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'nav navbar-nav',
'walker' => new My_Walker_Nav_Menu));
?>
<?php
if (get_theme_mod('show_search_box')) {
?>
<form role="search" method="get" class="navbar-form navbar-right" action="<?php echo home_url( '/' ); ?>">
<input type="search" class="form-control" placeholder="Search" value="" name="s" size="15" />
<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</form>
<?php
}
?>
</div>
</div>
</nav>
</header>
<main class="container-fluid" id="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">