Change recipient of email notifications for new comments in WordPress

If you do not want WordPress to send comments to the admin email or the post author only, add the following code to functions.php either in your theme folder or even better, in your child theme folder.

function if_change_recipient_comment_notification( $emails, $comment_id ){
 $recipient_email = 'example@example.com';
 
 return array( $recipient_email );
}
add_filter( 'comment_notification_recipients', 'if_change_recipient_comment_notification', 10, 2 );

NOTE: This guide is for WordPress developers or users that know how to access the php files

Was this article helpful?

Related Articles