转到此链接并单击子标题中显示“2条评论”的位置:http://themeforward.com/demo2/2011/01/17/lobortis-tellus-diam/
When the link that brings the user to the comments is clicked it doesn\'t just scroll users down the page, it brings them to what APPEARS TO BE a separate page (even though it isn\'t a separate page). This is caused by the extreme margin/padding I am using in #sidebar and #post_content which I am using for equal height columns... http://www.positioniseverything.net/articles/onetruelayout/equalheight Any fixes for this (while still using the equal height columns css)?
CSS:
#container {
overflow:hidden;
margin:35px auto
}
#sidebar {
width: 410px;
display:block;
padding-bottom: 32767px;
margin-bottom: -32767px;
float:right
}
#post_content {
display:block;
padding-right:25px;
padding-bottom: 32767px;
margin-bottom: -32767px;
margin-right:25px;
border-right:1px solid #EEE;
float:left;
width: 660px
}
#commentlist {
list-style:none;
width:100%
}
链接:
<a href="#commentlist"><?php comments_number( \'No comments\', \'One comment\', \'% comments\' ); ?></a>
最合适的回答,由SO网友:Chip Bennett 整理而成
当链接被分为多个页面(通过WordPress中的设置)并单击将用户带到评论的链接时,它不仅会将用户向下滚动页面,还会将用户带到创建的单独页面。
对这是WordPress的标准功能。对注释进行分页将导致对文章进行分页,并为当前注释页提供适当的查询字符串参数。
然而,在这种情况下,不会生成单独的页面,因为帖子没有足够的注释来分页。请注意,唯一的区别在于锚(#comments
) 正在附加到URL。我同意@Milo的观点,这是一个与CSS/标记相关的问题。