如果超过2个帖子,自定义Wordpress帖子页面会中断吗?
问题描述:
我有一个非常自定义的模板,如果博客页面上有1个或2个帖子,它会很好用。但是一旦添加了第三篇文章,它就会改变模板的结构......从字面上移动一个div到另一个里面,我不明白为什么。博客模板的代码就在这里,它应该是一个结构的屏幕截图,另一个显示第三篇文章在那里的错误div。这是否有意义,有什么想法?如果超过2个帖子,自定义Wordpress帖子页面会中断吗?
<div class="post" id="post-<?php the_ID(); ?>"><!--start post-->
<h2><?php the_title(); ?></h2>
<div id="main_full" class=" clearfix"><!--start main-->
<div id="top_bar"><h3 class="gallery-title">news</h3></div>
<div id="blog_page"><!--start blog page-->
<div class="entry"><!--start entry-->
<?php the_content(); ?>
</div><!--end entry-->
</div><!--end blog page-->
</div><!--end main-->
<?php endwhile; endif; ?>
</div><!--end post-->
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
<?php comments_template(); ?>
答
没有看到你的循环的开始,我不能100%肯定,但它看起来像你需要有:
<?php endwhile; endif; ?>
</div><!--end post-->
是
</div><!--end post-->
<?php endwhile; endif; ?>
答
<?php endwhile; endif; ?>
</div><!--end post-->
翻转他们的地方。如果没有帮助,请告诉我们什么时候以及什么时候结束。
删除了损坏的链接 – Verbeia 2011-10-15 23:58:45