-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
63 lines (61 loc) · 1.55 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
<!Doctype html>
<html>
<head>
<meta property="wb:webmaster" content="2e89b310a854ac97" />
<meta name="baidu-site-verification" content="NPeIpGxkNd" />
<meta name = "keywords" content = "IT博客,学习笔记,读书随想,计算机,大数据,云计算,操作系统"/>
<meta name = "description" content = "生活、读书、知新 一个伪IT、伪文艺、伪愤青的读书学习笔记,关注计算机,关注文学历史"/>
<title>
<?php
if (is_home())
{
bloginfo('name');
echo " - ";
bloginfo('description');
}
elseif (is_category())
{
single_cat_title();
echo " - ";
bloginfo('name');
}
elseif (is_single() || is_page())
{
single_post_title();
echo " - ";
bloginfo('name');
}
elseif (is_search())
{
echo "搜索结果 - ";
bloginfo('name');
}elseif (is_tag()) {
single_tag_title();
echo "-";
bloginfo('name');
}
else
{
wp_title('', true);
}
?>
</title>
<link rel="shortcut icon" href="<?php bloginfo('template_directory');?>/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url');?>">
<?php wp_head(); ?>
<?php flush(); ?>
</head>
<body>
<a name="gotop"></a>
<header class = "header_wrap">
<div class = "header_box">
<div class = "logo"><a href="<?php bloginfo('url');?>"><img src = "<?php bloginfo('template_url'); ?>/img/logo.png"/></a>
</div>
<nav class = "nav">
<?php wp_nav_menu( array( 'menu' => 'mymenu', 'depth' => 1) );?>
</nav>
<div class = "search">
<?php get_search_form();?>
</div>
</div>
</header>