如何在具有特色评论的WordPress中特色/隐藏评论

Comments are great for increasing user engagement, but as your site grows in popularity long comment threads can become a mixed blessing. On one hand you love the community and the discussion, but on the other hand you’ll notice that some comments are great while others not so much. Recently one of our readers came to us with this problem in hopes of finding a solution. To improve the quality of discussion, you can encourage good comments by featuring them and discourage unhelpful comments by burying them. In this article, we will show you how to feature/bury comments in WordPress.

评论非常有助于提高用户的参与度,但是随着您网站的流行,长评论线程可能会成为喜忧参半的事情。 一方面,您喜欢社区和讨论,但另一方面,您会注意到一些评论很棒,而另一些则不是。 最近,我们的一位读者遇到了这个问题,希望找到解决方案。 为了提高讨论的质量,您可以通过添加特色的来鼓励良好的评论,并通过掩埋来阻止无用的评论。 在本文中,我们将向您展示如何在WordPress中添加/隐藏评论。

为什么要添加特色评论? (Why Add Featured Comments?)

Fostering a large community can be a challenge. You want to make sure that you’re rewarding users who’re adding the most value to the discussion while at the same time politely discouraging other users for leaving unhelpful comments.

培养一个大社区可能是一个挑战。 您要确保奖励给在讨论中增加最大价值的用户,同时礼貌地劝阻其他用户留下无用的评论。

This is when Featured Comments come in handy. It allows the admins to highlight the best comments by featuring them.

这是“ 特色评论”派上用场的时候。 它允许管理员通过突出显示最佳评论。

It also helps you politely discourage unhelpful comments. Often bloggers delete the unhelpful comments which results in the user complaining about censorship. This can look bad and cause others from abandoning the community.

它还可以帮助您礼貌地阻止无用的评论。 博客通常会删除无用的评论,从而导致用户抱怨审查制度。 这看起来很糟糕,并导致其他人放弃社区。

This plugin adds the ability for admins to bury a specific comment which will minimize the comment rather than deleting it. In other words, the users leaving the comment won’t complain about censorship while other users can browse through the comments without the distraction.

该插件为管理员增加了隐藏特定评论的功能,这将使评论最小化而不是删除它。 换句话说,发表评论的用户不会抱怨审查制度,而其他用户可以浏览评论而不会分心。

One of our favorite sites, CSS Tricks by Chris Coyier uses this technique.

Chris Coyier撰写的CSS Tricks是我们最喜欢的网站之一,使用了该技术。

Featured Comments

Notice how he’s burying the unhelpful comments while highlight the good ones.

请注意他是如何掩埋无用评论的同时突出显示好评论。

如何在WordPress中设置特色评论 (How to Setup Featured Comments in WordPress)

First thing you need to do is install and activate the Featured Comments plugin. After activating the plugin, you can go to the Comments screen in your admin area where you will notice Feature and Bury links below each comment. Once you feature a comment, it will turn green in the admin area where as buried comments will be dimmed, like this:

您需要做的第一件事是安装并激活Featured Comments插件。 激活插件后,您可以转到管理区域中的“ 评论”屏幕,在其中您会注意到每个评论下方的“ 功能”和“ 埋葬”链接。 注释发表后,它将在管理区域中变为绿色,其中隐藏的注释将变暗,如下所示:

Featured and Buried comments highlighted differently on Comments screen

However, these changes are not reflected by default on the front-end of your site. The plugin simply adds a CSS class .featured or .buried to respective comments, and give you full freedom to control how you want it to look by modifying the CSS.

但是,默认情况下,这些更改不会反映在网站的前端。 该插件只需在相应的注释中添加一个.featured或.buried CSS类,即可通过修改CSS来完全自由地控制其外观。

special class added to comments to handle display of featured or buried comments

You can add CSS classes in your theme’s stylesheet to handle the display of featured and buried comments on the front end.

您可以在主题的样式表中添加CSS类,以处理前端的特色和隐藏注释的显示。

Below is an example CSS snippet that you can use. If you want to make it look like CSS-Tricks, then you will have to add some jQuery magic as well.

以下是您可以使用CSS片段示例。 如果要使其看起来像CSS-Tricks,则还必须添加一些jQuery魔术。


#comments li.featured { 
background-color:#eee;
} 
#comments li.buried {
opacity: 0.5;
}

Feel free to modify the CSS to match your own color scheme. If you use the CSS above, then this is how featured and buried comments will appear on your site.

随意修改CSS以匹配您自己的配色方案。 如果您使用上面CSS,那么这就是特色和隐藏注释在您的网站上显示的方式。

Highlighting featured comments and dimming buried comments

On top of having the admins or moderators making the executive decision about featured/bury comments, you can also let users report inappropriate comments. This will make your job a bit easier while at the same time make your community feel like they’re part of something bigger.

除了让管理员或主持人就精选/隐藏评论做出行政决定外,您还可以让用户举报不当评论 。 这将使您的工作容易一些,同时使您的社区感觉自己像是更大的一部分。

We hope this article helped you highlight good comments and discourage bad comments with Featured Comments. For feedback and questions, please leave us a comment below or join us on Twitter.

我们希望本文能帮助您突出显示良好的评论,并通过精选评论来阻止不良的评论。 对于反馈和问题,请在下面给我们留言或在Twitter上加入我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-feature-bury-comments-in-wordpress-with-featured-comments/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值