天天看点

wordpress 自定义_如何在WordPress中添加更好的自定义通知

wordpress 自定义_如何在WordPress中添加更好的自定义通知

wordpress 自定义

WordPress sends email notifications to administrators to notify them of new comments, new user registration, etc. Usually these notifications become annoying for a busy site and people seek ways to turn them off. What if we told you that you can customize these notifications and even add your own custom notifications for different events for different users. In this article, we will show you how to add and customize notifications in WordPress.

WordPress将电子邮件通知发送给管理员,以通知他们新的评论,新的用户注册等信息。通常,这些通知对于繁忙的网站变得很烦人,人们寻求将其关闭的方法 。 如果我们告诉您可以自定义这些通知,甚至为不同用户的不同事件添加自己的自定义通知,该怎么办。 在本文中,我们将向您展示如何在WordPress中添加和自定义通知。

wordpress 自定义_如何在WordPress中添加更好的自定义通知

First thing you need to do is install and activate the Better Notifications for WordPress plugin. Upon activation the plugin will add a new ‘Notifications’ tab in your WordPress admin sidebar.

您需要做的第一件事是安装并激活WordPress更好的通知插件。 激活后,插件将在您的WordPress管理员侧栏中添加一个新的“通知”标签。

To add a notification, you need to visit Notifications » Add New.

要添加通知,您需要访问通知»添加新内容 。

wordpress 自定义_如何在WordPress中添加更好的自定义通知

You will need to provide a title for the notification and select the event when this notification will be sent from the Notification for drop down menu. There are a number of events that you can send notifications for such as new comments, lost password, new user registration, new user welcome email, comment reply notification, post pending review, post updated, post scheduled, and more.

您需要为通知提供标题,并在“ 通知”下拉菜单中发送该通知时选择事件。 您可以发送许多事件来发送通知,例如新评论,密码丢失,新用户注册,新用户欢迎电子邮件,评论回复通知,发布待审核,发布更新,预定发布等等。

On the next section, you will be asked to choose email formatting, add additional email fields such as cc, bcc, and select which user role will receive the notification email.

在下一部分中,将要求您选择电子邮件格式,添加其他电子邮件字段(例如cc,bcc),并选择将接收通知电子邮件的用户角色。

wordpress 自定义_如何在WordPress中添加更好的自定义通知

This plugin supports custom roles, so if you are using a membership plugin, then those user roles will appear here as well. You can also choose to send the notification to the main user who triggered the action or disable the notification for them by using the respective checkbox.

该插件支持自定义角色,因此,如果您使用的是成员资格插件,则这些用户角色也将显示在此处。 您也可以选择将通知发送给触发该操作的主要用户,或者使用相应的复选框来为他们禁用通知。

Now comes the actual notification email part.

现在是实际的通知电子邮件部分。

wordpress 自定义_如何在WordPress中添加更好的自定义通知

First you need to provide a subject line for your notification email. After that, you need to enter the message body. Make sure that your message is descriptive and contains links so that users receiving the notifications know what they are expected to do next.

首先,您需要为通知电子邮件提供一个主题行。 之后,您需要输入消息正文。 确保您的消息具有描述性,并包含链接,以便接收通知的用户知道下一步该做什么。

The plugin accepts a number of shortcodes, so you can use those tags inside your notification message to display post permalinks, usernames, comment id, comment links, user names, etc. See the full list of tags.

该插件接受许多短代码,因此您可以在通知消息中使用这些标签来显示帖子永久链接,用户名,评论ID,评论链接,用户名等。请参阅标签的完整列表 。

Once you are finished, simply click on the Send Me a Test Email button.

完成后,只需单击“向我发送测试电子邮件”按钮。

wordpress 自定义_如何在WordPress中添加更好的自定义通知

If everything looks good in the test email, then click on the save button to enable this notification.

如果测试电子邮件中的所有内容看起来都不错,请单击“保存”按钮以启用此通知。

Troubleshooting

故障排除

If for some reason, your users are not receiving the email, then the first thing you need to check is that you have selected the correct user role or username for the notification.

如果由于某种原因您的用户没有收到电子邮件,那么您需要检查的第一件事是您为通知选择了正确的用户角色或用户名。

After that check out our guide on how to fix WordPress not sending email issue which will surely fix the issue.

之后,请查看有关如何解决WordPress不发送电子邮件问题的指南 ,这肯定会解决该问题。

We hope this article helped you learn how to add and customize notifications in WordPress. You may also want to take a look at our guide on how to monitor user activity in WordPress.

我们希望本文能帮助您学习如何在WordPress中添加和自定义通知。 您可能还需要看一下我们如何在WordPress中监视用户活动的指南。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Google+上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-better-custom-notifications-in-wordpress/

wordpress 自定义