最近我一直在制作WordPress主题,刚刚一些代码停止工作。帖子格式化消失了,现在我只是在每个帖子里面都有一段文字!下面是该职位的PHP代码:WordPress主题问题
<?php get_header(); ?>
<div id="content">
<div class="wrap">
<div id="leftcol">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="meta alignleft">
<span class="date"><?php the_time('F j, y') ?></span>
<span class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
<span class="tags"><?php the_tags('', ', ', ''); ?></span>
</div>
<div class="body alignright">
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<div class="clear"></div>
</div>
<?php endwhile; ?>
<ul>
<li><?php next_posts_link('« Older Entries') ?></li>
<li><?php previous_posts_link('Newer Entries »') ?></li>
</ul>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
</div>
</div>
这是在主题文件夹中的index.php文件的所有代码。我在帖子的左侧有帖子的一些元数据,在右侧有帖子的实际帖子。
这是什么是输出到页面。 (这只是什么#内容DIV中,有太多对我来说,一切都张贴)
<div id="content"><div class="wrap">
<div id="leftcol">
<p>This is some random text that’s added just for effect. Thanks for the consideration. This is some random text that’s added just for effect. Thanks for the consideration. This is some random text that’s added just for effect. Thanks for the consideration. This is some random text that’s added just f<a href="#">or effect. Thanks for</a> the consideration. </p>
<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! Welcome to WordPress</p>
</div></div></div>
发生了什么事!?
这是一个编程问题,属于stackoverflow。 – tbird 2009-12-11 18:04:37