该博客的首页旨在显示帖子摘录和帖子图片的裁剪版本。第一个/最新的摘录非常完美,但随后的旧摘录显示出有些右移。我认为问题出在我的循环中,但我已经看了这么久了,我认为需要一双新鲜的眼睛。
指数php-
<?php echo get_header();;?>
<?php echo get_sidebar();;?>
<div id="blog">
<div class="preview">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post-image">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail( \'custom-image\' );
}
?>
</div>
<div class="post">
<h2><?php the_title() ;?></h2>
<span class="post-preview">
<?php the_excerpt(\'read more...\'); ?>
<?php endwhile; else: ?>
<p>Sorry, no posts to list</p>
<?php endif; ?>
</span><!-- end post-preivew -->
<p class="post-meta"><span style="font-family: amatic;">>></span> Posted on <?php the_date(\'M-d-y\'); ?> <span style="font-family: amatic;">>></span> <?php the_tags(\'tags: \', \', \', \'<br />\'); ?></p><!-- end post-meta -->
</div><!-- end post -->
</div><!-- end preview -->
</div><!-- end blog -->
<?php get_footer(); ?>