先来看下效果
之前由于限制了5层套子 现在感觉有些不够 所以加大一下
在comments.php评论回调函数添加“&max_depth=77”,即嵌套层数改为77
1 |
<?php wp_list_comments('type=comment&callback=mytheme_comment&max_depth=77'); ?> |
不过由于会缩进 越来越小也不好看 所以还要继续下一步
在functions.php内回调评论函数内找到类似:
1 |
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>"> |
修改为:
1 |
<li <?php comment_class('clearfix'); ?><?php if( $depth > 7){ echo ' style="margin-left:-11px;margin-right:-11px;"';} ?> id="comment-<?php comment_ID() ?>" > |
其中"$depth > 7"是指7层以后的套子开始执行 "margin-left:-11px;margin-right:-11px;"则是左右各缩进11达到评论框不缩放的目的
自动@回复的功能貌似实现起来有点困难 怕会错意的话请自行点击@回复吧
2013年07月24日 11:20 沙发
站長本身的評論都沒有顯示在最新評論中
2013年07月24日 11:35 1层
@ioritree 这个是改过的 我再去改回来
2014年08月27日 22:26 2层
@七支剑 测试
2013年07月24日 11:49 1层
@ioritree 改回来了 增加到了15条 都是我的留言啊 lol
2013年07月24日 12:56 1层
@ioritree 话说你的头像是谁啊 看上去不错的样子
2013年07月24日 12:58 2层
@七支剑 別人Cosplay 米卡莎·阿卡曼..
2013年07月24日 12:59 3层
@ioritree 三爷啊 难怪有点眼熟
2015年06月10日 16:56 板凳
test test