Title: email when comments on specific posts
Last modified: March 6, 2021

---

# email when comments on specific posts

 *  Resolved [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/)
 * Hi thanks for this very good plugin.
    Now I would like to send an email to specific
   users when a comment is issued, but **only for some specific posts**. Is this
   possible without programming php lines and how?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14147412)
 * I found the relevant solution for my previous question with the plugin extension:“
   Conditionals” which is exactly what I was looking for.
    Now I would like to exclude
   some specfic users when the target is a role. How to do that ?
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14148249)
 * What do you mean by:
 * > exclude some specfic users when the target is a role
 *  Thread Starter [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14149559)
 * Sorry I’ll try to clearer:
    I would to send the e-mail to all users with a specified
   role, subscriber for example, except for these 2 or 3 users identified by mean
   of their userid or user-email.
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14149907)
 * Ahh, unfortunately, this isn’t possible with the add-on nor the base plugin. 
   The only way to exclude the recipients is to use the programmatic filter. Are
   you comfortable putting the custom code on your site?
 *  Thread Starter [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14150749)
 * Not really, but if you give me some explanations I’ll try 😉
    Is the code tobe
   added in function.php? If so I can do, but I’m not able to write the code by 
   myself 😥
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14151859)
 * Sure, `functions.php` of the child theme would work just fine!
 * This is your code: [https://pastebin.com/8bydtLRw](https://pastebin.com/8bydtLRw)
 * There are two places to adjust the code:
    – line 4. I wasn’t sure if this is 
   the trigger you are using. Please [refer to the docs](https://docs.bracketspace.com/notification/developer/triggers/default-triggers)
   to match the trigger name with the slug – line 9 and 10. Exclude the emails 🙂
 * I hope this helps!
 *  Thread Starter [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14154770)
 * Thanks a lot Kuba I’ll try that.
 *  Thread Starter [cari18](https://wordpress.org/support/users/cari18/)
 * (@cari18)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14271750)
 * The code applied, it works as promissed.
    Thanks a lot
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14273883)
 * Awesome! Please consider [leaving a short review](https://wordpress.org/support/plugin/notification/reviews/#new-post)
   of the plugin if you like it 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘email when comments on specific posts’ is closed to new replies.

 * ![](https://ps.w.org/notification/assets/icon-256x256.gif?rev=3476901)
 * [Notification - Custom Notifications and Alerts for WordPress](https://wordpress.org/plugins/notification/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/notification/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/notification/)
 * [Active Topics](https://wordpress.org/support/plugin/notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/notification/reviews/)

## Tags

 * [specific posts](https://wordpress.org/support/topic-tag/specific-posts/)

 * 9 replies
 * 2 participants
 * Last reply from: [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/email-when-comments-on-specific-posts/#post-14273883)
 * Status: resolved