forked from aaronds/bristol-hackspace-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
executable file
·39 lines (39 loc) · 1.74 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<title>
<?php
if (is_home()) {
echo 'Welcome '.get_bloginfo('name');
} elseif (is_404()) {
echo '404 Not Found on '.get_bloginfo('name');
} elseif (is_category() || is_page() || is_single() ) {
echo wp_title(' | ',true,'right').get_bloginfo('name');
} elseif (is_search()) {
echo 'Search for “'.get_search_query().'” | '.get_bloginfo('name');
} elseif ( is_day() || is_month() || is_year() ) {
echo get_bloginfo('name');
} elseif ( is_page()) {
echo wp_title(' | ',true,'right').get_bloginfo('name');
} else {
echo get_bloginfo('name');
}
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<?php if(is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<link rel="icon" href="/favicon.ico" />
<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'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<header>
<div class="inner">
<a class="logo" href="<?php echo get_option('home'); ?>/"><img src="<?= get_stylesheet_directory_uri() ?>/logo.svg" alt="The Hitchin Hackspace logo"></a>
<?php wp_nav_menu( array('menu' => 'Top Navigation','container' => false,'menu_id' => "main_navigation")); ?>
</div>
</header>