非常奇怪的问题,这只发生在一个特定的模板中。部分零件“泄漏”到标签中,我不知道为什么。
“header.php”代码:
<!DOCTYPE html>
<html lang="he">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IT=edge,chrome=IE8">
<title><?php bloginfo(\'name\'); ?> <?php if ( is_single() ) { ?> <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo(\'version\'); ?>" /> <!-- leave this for stats -->
<!-- the site meta data for search-->
<meta name="description" content="****" />
<meta name="keywords" content="****" />
<!--end of meta data-->
<link rel="stylesheet" href="<?php bloginfo(\'stylesheet_url\'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo(\'rss2_url\'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo(\'rss_url\'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo(\'atom_url\'); ?>" />
<link rel="pingback" href="<?php bloginfo(\'pingback_url\'); ?>" />
<?php wp_get_archives(\'type=monthly&format=link\'); ?>
<?php wp_head(); ?>
<!--IE specific bugs some of this doesn\'t work yet -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<style type="text/css" media="screen">
body {
behavior:url("<?php bloginfo(\'template_url\');?>/csshover3.htc");
}
#booklist li:hover {
-moz-box-shadow: 1px 1px 5px #999;
-webkit-box-shadow: 1px 1px 5px #999;
box-shadow: 1px 1px 5px #999;
behavior:url("<?php bloginfo(\'template_url\');?>/PIE.php");
}
</style>
<![endif]-->
<!--google analytics code-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-****-1\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!--end of google analytics code-->
</head>
<body>
<div id="container">
<header>
<div id="header">
<!-- בשביל להחזיר את הכותרת ותיאור הבלוג לכאן להוריד את סימן ההערה מהhtml
<h1><a href="<?php echo get_settings(\'home\'); ?>/"><?php bloginfo(\'name\'); ?></a></h1>
<h2><?php bloginfo(\'description\'); ?></h2>
-->
</div>
<nav id="menu">
<ul>
<li style="zoom:1" class="<?php if (is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php bloginfo(\'url\'); ?>" title="Home">ראשי</a></li>
<?php wp_list_pages(\'title_li=&depth=1\'); ?>
</ul>
<!--<div id="menu"></div>-->
</nav>
</header>
模板代码(相关部分):
<!--?php /* Template Name: bookstore*/ ?-->
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<!-- בשביל להחזיר את שם העמוד צריך לבטל את סימן ההערה ב# -->
<h2><?php #the_title(); ?></h2>
<div class="entry">
<!--<h1 style="text-align: center; ">
<strong>
</strong>
</h1>--> <?php the_content(\'<p>Continue reading »</p>\'); ?>
<?php //if page is split into more than one
link_pages(\'<p>Pages: \', \'</p>\', \'number\'); ?>
</div>
</div>
<?php endwhile; endif; ?>
<div class="entry">
泄漏部分是链接rel=“prev”之后的所有内容
很高兴能帮上忙