解决嵌套回复按钮不显示问题

12-09 | 夜光 | IT记录

当我们在主题中使用嵌套回复时,如果发现“回复”按钮不显示,可以按以下方法解决:

一、首先在后台开启嵌套回复:

“设置”-“讨论”-“启用嵌套回复”,后面还可以设置最大允许嵌套的层数

二、正确使用comment_reply_link()函数:

看,wordpress默认的代码如下:

<?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

comment_reply_link()函数的参数见

我最后用的代码如下:

<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'after' => ' | '))) ?>
本文标签:
本文链接: wordpress-reply-button-does-not-display/
版权所有: 玻璃泉, 转载请注明本文出处。