日期:2014-05-17 浏览次数:20601 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
<title>
<?php
global $page, $paged;
if(is_home()){ $options = get_option('xiaohan_options'); echo($options['indextitle']);}else{wp_title( '|', true, 'right' );
bloginfo( 'name' );
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'xiaohan' ), max( $paged, $page ) );
}
?>
</title>
<?php if (is_home()){
$options = get_option('xiaohan_options');
$description = ($options['indexdescription']);
$keywords = ($options['indexkeyword']);
} elseif (is_single()){
if ($post->post_excerpt) {
$description = $post->post_excerpt;
} else {
$description = utf8_CsubStr(strip_tags($post->post_content),0,190);
}
$keywords = "";
$tags = wp_get_post_tags($post->ID);
foreach ($tags as $tag ) {
$keywords = $keywords . $tag->name . ", ";
}
} elseif (is_category()){
$description = strip_tags(category_description());
$categoryname = get_the_category();
$keywords = $categoryname[0]->cat_name;
}
?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<meta name="description" content="<?php echo $description; ?>" />
//下面这行是代码,想要在这位置插入,因为修改了html用了一些CSS 直接用代码会造成页面错位,所以只能调用html页面
<script src='http://www.sbisyou.com/plus/ad_js.php?aid=5' language='javascript'></script>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php $options = get_option('xiaohan_options'); if ($options['feed_url']) {echo($options['feed_url']);} else bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/base.js"></script>
<?php $options = get_option('xiaohan_options'); if ($options['submenu']){?>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/superfish.css" type="text/css" media="screen" />
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/hoverIntent.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/superfish.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.bgiframe.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("ul.menu").superfish().find('ul').bgIframe({opacity:false});
});
</script>
<?}else{?>
<style>#nav ul.sub-menu{display:none;}</style>
<?php }?>
<?php wp_head(); ?>
</head>
<bo