代码:
顶部的两个协议我去掉了! 论坛不让发带连接
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
<title>
<?php
global $page, $paged;
if(is_home()){ $options = get_option('xiaotang_options'); echo($options['indextitle']);}else{wp_title( '|', true, 'right' );
bloginfo( 'name' );
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'xiaotang' ), max( $paged, $page ) );
}
?>
</title>
<?php if (is_home()){
$options = get_option('xiaotang_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; ?>" />
<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('xiaotang_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('xiaotang_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>
<body <?php body_class(); ?>>
<div id="top">
<div id="header">
<div id="blog_title">
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<p><?php bloginfo('description'); ?></p>
<div class="banner"><?php
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
$options = get_option('xiaotang_options');
$banner_link = $options['banner_link'];
$banner_link_target = $options['banner_link_target'];
$banner_link_xfn = $options['banner_link_xfn'];
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else : ?>
<a href="<?php echo $banner_link;?>"<?php if($banner_link_target==1) echo ' target="_blank"'; ?><?php if($banner_link_xfn==1) echo ' rel="nofollow"'; ?>><img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /></a>
<?php endif; ?>
</div>
</div>
<div id="nav">
<?php wp_nav_menu('container=\'\'&menu_id=menu&title_li=&link_before=<span>&link_after=</span>'); ?>
</div>
</div>
</div>
<div id="wrap">
来源于:www.16466.com |