wordpress博客文章上的奇怪格式

时间:2013-06-23 07:33:15

标签: php wordpress woocommerce

我尝试通过将<?php the_excerpt(); ?>更改为<?php the_content(); ?>来更改博客页面以显示整个帖子而不是摘录。我在index.php文件和page-blog.php文件中进行了此更改。

看起来不错,直到我向下滚动到第三个名为“Chalk it Up”的帖子。应该位于帖子最底部的条形图,其中包含作者,日期和评论信息,而不是位于帖子中间的视频正下方。下一篇文章的标题也就在那里。

这是位于错误位置的栏的代码:

<footer class="entry-meta">
<?php theretailer_posted_on(); ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'theretailer' ), __( '1 Comment', 'theretailer' ), __( '% Comments', 'theretailer' ) ); ?></span>
<?php endif; ?>

<?php edit_post_link( __( 'Edit', 'theretailer' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->  

有人对如何修复有任何建议吗?

http://glitterriot.com/blog/

1 个答案:

答案 0 :(得分:2)

这是因为浮动。尝试在页脚前添加一个clear:both的div。

/* in css */
.clear {
    clear: both;
    height: 0px;
}


<div class="clear"></div>
<footer class="entry-meta">
....