-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
50 lines (49 loc) · 1.91 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<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();
} elseif (is_search() ) {
echo "搜索结果"; echo " - "; bloginfo('name');
} elseif (is_404() ) {
echo '页面未找到!';
} else {
wp_title('',true);
} ?>
</title>
<!--[if IE]><!--><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style-ie.css" type="text/css" media="screen" /><!--<![endif]-->
<!--[if !IE]><!--><link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /><!--<![endif]-->
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有文章" href="<?php echo get_bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有评论" href="<?php bloginfo('comments_rss2_url'); ?>" />
<?php wp_head(); ?>
</head>
<?php flush(); ?>
<body>
<div id="wrapper">
<div id="header-box">
<div id="header">
<div class="top-menu">
<?php wp_nav_menu( array( 'theme_location' => 'top-menu') ); ?>
</div>
<div id="title-box">
<h1 id="title"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
<p id="sub-title"><?php bloginfo('description'); ?></p>
</div>
<div id="header-split-box"></div>
<div id="header-search-box">
<?php get_search_form(); ?>
</div>
</div>
</div>
<div class="main-nav-box">
<div class="main-nav">
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
</div>
</div>