Support » Plugin: Notification - Custom Notifications and Alerts for WordPress » email when comments on specific posts

  • Resolved cari18

    (@cari18)


    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

    (@cari18)

    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

    (@kubitomakita)

    What do you mean by:

    exclude some specfic users when the target is a role

    Thread Starter cari18

    (@cari18)

    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

    (@kubitomakita)

    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

    (@cari18)

    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

    (@kubitomakita)

    Sure, functions.php of the child theme would work just fine!

    This is your code: 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 to match the trigger name with the slug
    – line 9 and 10. Exclude the emails πŸ™‚

    I hope this helps!

    Thread Starter cari18

    (@cari18)

    Thanks a lot Kuba I’ll try that.

    Thread Starter cari18

    (@cari18)

    The code applied, it works as promissed.
    Thanks a lot

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Awesome! Please consider leaving a short review of the plugin if you like it πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.