how-to-automatically-notify-authors-when-their-blog-is-published-in-wordpress

Running a multi-author blog can be a challenging chore especially when it comes to updating your authors regarding their post status. When you have too many authors working for your website it usually becomes pretty difficult to keep a track if the author has been informed.

But why it’s important to inform your author?

Well, when the article of any of your WordPress website author is published they should be notified about the publication so that they can also participate in the discussion and advertise the article on their social media accounts as well as on other platforms. This helps you drive huge traffic to your blog and generate revenue. It also allows your authors to respond to the comments posted by the users on their articles, making it easy for you to manage your content and users.

But a majority of webmasters may not know that WordPress provides a method to automatically notify authors when their blog is published.
In today’s post, we are going to show certain methods to get the job done.

Method 1: Sending notification using Edit Flow

For this method, you will need a plugin called Edit Flow. Just install and activate the said plugin to configure email notifications.

Edit Flow plugin

sending-notification-using-edit-flow

The plugin allows you to collaborate with your editorial team within WordPress. Edit Flow plugin integrated with tons of options that allow you to easily manage your editorial team. Edit Flow is a powerful, profound and the most advanced WordPress plugin that can do a lot more than just sending notifications to the authors.

Some of the popular features of this plugin include creating user groups, adding editorial metadata, editorial comments, calendar, custom statuses and more.

As soon as you activate the plugin, it will start sending notifications to the respective authors once their posts are published. However, this default setting of Edit Flow plugin does not notify the admin about the notifications sent to the authors.

In order to notify the admin as well, you need to configure the settings first. Click edit flow → notifications. You will be redirected to the notification page of the plugin where you have to enable “Always notify blog admin” option. Hit save changes.

Once enabled, the site admin will start receiving the notifications along with the authors.

Method 2: Better Notifications

This is yet another popular way of keeping your authors informed about their post-publication. Even for this method, you would need a plugin installed i.e. Better Notification for WordPress plugin.

Better Notification for WordPress

better-notifications

Better Notification for WordPress is yet another popular WordPress plugin that enables you to create custom email notifications and sends them to individual users or user roles for almost every type of things happening on your WordPress website.

Creating custom email notification for your authors

You will need to install and activate the plugin on your WordPress website. Once activated, click Notifications → add new. You will be redirected to Add New Notification page where you will be able to create a custom email notification for your authors.

First off, you need to enter the title of the email notification. You can enter any title. We chose Published Post Notification for Authors. Similarly, you have to enter Notification For text box with the relevant info such as Recent Post Published. Now check “Send this notification to the Author only” checkbox in front of Additional Email Fields option. Enter the most suitable subject line and email body. The plugin allows you to use shortcodes in the email body like [user_nicename], [permalink] and [post_title].

Once you have entered all the details, hit save to save all the changes.
So, now whenever you publish an article of one of your authors, the plugin will automatically send a notification to him/her.

Method 3: Manually sending notification to the authors

Well, this method is recommended for those who do not want to use any kind of plugin and know how to add code snippets.

For this method, you are required to add the following code snippet to your functions.php file.

function notifyauthor($post_id) {
$post = get_post($post_id);
$author = get_userdata($post->post_author);
$subject = "Post Published: ".$post->post_title."";
$message = "
Hi ".$author->display_name.",
Your post, \"".$post->post_title."\" has just been published.
View post: ".get_permalink( $post_id )."
Thanks"
;
wp_mail($author->user_email, $subject, $message);
}
add_action('publish_post', 'notifyauthor');

The code sends automatic email notifications to the authors when a new post is published with the subject and message defined in the code. You can alter the subject and message as per your requisites.

Conclusion:

No matter which method you choose to send notifications, you can now easily keep your authors informed about their post statuses.
If you know any other method, feel free to leave a comment in the comments section below.

Author Bio:

Kerin Miller is an expert WordPress developer having years of experience in working with various web development technologies. Currently, she is working for Stellen Infotech, a leading WordPress Development Company around the globe. She is always trying to share her intangible knowledge with others on the web.