我有一个使用免费的Hueman WordPress主题的博客。出于某种原因,无论我似乎启用/禁用哪些设置,用户添加评论的功能都不会显示在我的博客文章中。
有没有人遇到过同样的问题?有谁知道如何让这个工作?
由于
答案 0 :(得分:0)
Comments stop working for me in Hueman when I use custom posts. For some reason the comments are closed. Workaround for this is to force open the comments. Just add this in your functions.php file in your child theme:
function my_override_comments_open( $open ) {
if ( is_single() ) {
$open = true;
}
return $open;
}
add_filter('comments_open', 'my_override_comments_open', 1000);
I don't like comments on pages, just posts. So I use is_single() check. If you want comments on all posts & pages just remove it. Hope this helps.