让wordpress的评论显示楼层序号的方法
修改comment.php文件:
- 1. 找到<ol class="commentlist">,在这句下面添加<strong><?php $relax_comment_count=1; ?></strong>
- 2. 一般下面都会有一段<li></li>的语句,在这段语句下面添加<strong><?php $relax_comment_count++; ?></strong>
- 3. 上面说到的那句<li></li>中可以找到一句<?php comment_text() ?>,在此句上方添加<strong><div class="commentcount"><?php echo $relax_comment_count; ?></div></strong>
- 接下来就是用css来调整一下commentcount的表现形式,在style.css里增加类似下面的内容:
- .commentcount {
- font-family: Georgia,sans-serif;
- font-size: 24px;
- font-weight: bold;
- color: #e0e0d0;
- float: right;
- }
留言板里的评论是倒序,怎么办?如何区分开?
回复
阿囧 Reply:
10月 7th, 2008 at 13:04
< ?php $relax_comment_count++; ?> 改成
< ?php $relax_comment_count--; ?> 试一下
回复
阿囧 Reply:
10月 8th, 2008 at 00:16
测试Ajax
回复
显示楼层挺不错的,可是懒得搞这东西了…
回复
阿囧 Reply:
10月 8th, 2008 at 00:14
嘿嘿,
回复
阿囧 Reply:
10月 8th, 2008 at 02:04
测试
回复
我的改后从0楼开始,怎样改成一楼开始呢?
回复
还有怎样添加单位楼?
回复