forked from joshbeckman/naked-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
69 lines (58 loc) · 2.84 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
<?php
/*-----------------------------------------------------------------------------------*/
/* This template will be called by all other template files to begin
/* rendering the page and display the header/nav
/*-----------------------------------------------------------------------------------*/
?>
<!DOCTYPE html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title>
<?php bloginfo('name'); // show the blog name, from settings ?> |
<?php is_front_page() ? bloginfo('description') : wp_title(''); // if we're on the home page, show the description, from the site's settings - otherwise, show the title of the post or page ?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // We are loading our theme directory style.css by queuing scripts in our functions.php file,
// so if you want to load other stylesheets,
// I would load them with an @import call in your style.css
?>
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head();
// This fxn allows plugins, and Wordpress itself, to insert themselves/scripts/css/files
// (right here) into the head of your website.
// Removing this fxn call will disable all kinds of plugins and Wordpress default insertions.
// Move it if you like, but I would keep it around.
?>
</head>
<body
<?php body_class();
// This will display a class specific to whatever is being loaded by Wordpress
// i.e. on a home page, it will return [class="home"]
// on a single post, it will return [class="single postid-{ID}"]
// and the list goes on. Look it up if you want more.
?>
>
<header id="masthead" class="site-header" role="banner">
<div class="container center">
<nav role="navigation" class="site-navigation main-navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); // Display the user-defined menu in Appearance > Menus ?>
</nav><!-- .site-navigation .main-navigation -->
</div>
<div class="center">
<div id="brand">
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); // Link to the home page ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); // Title it with the blog name ?>" rel="home"><?php bloginfo( 'name' ); // Display the blog name ?></a>
</h1>
<h4 class="site-description">
<?php bloginfo( 'description' ); // Display the blog description, found in General Settings ?>
</h4>
</div><!-- /brand -->
<div class="clear"></div>
</div><!--/container -->
</header><!-- #masthead .site-header -->
<div class="main-fluid"><!-- start the page containter -->