【问题标题】:Strange formatting on wordpress blog postwordpress 博客文章上的奇怪格式
【发布时间】:2013-06-23 07:33:14
【问题描述】:

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

看起来不错,直到我向下滚动到名为“粉笔”的第三个帖子。应该在帖子最底部的带有作者、日期和评论信息的栏位于帖子中间视频的正下方。下一篇文章的标题也在那里。

这是错误位置的酒吧代码:

<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/

【问题讨论】:

  • 需要更多列出帖子的代码。
  • 我刚刚更新了描述。让我知道我是否应该投入更多。
  • redreggae 的回答解决了这个问题!

标签: php wordpress woocommerce


【解决方案1】:

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

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


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

【讨论】:

  • 将它添加到 index.php 文件中,它就像一个魅力。感谢您的帮助!
猜你喜欢
  • 2012-05-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-25
  • 2018-06-05
  • 1970-01-01
  • 2011-12-28
相关资源
最近更新 更多