Okay I know the title is pretty vague but I didn't know how to articulate it.

Basically, I want a plugin that sends email notifications to users who opted-in only if they specifically got replied to.

WordPress has its built-in functionality for comment threading/replying, so instead of bombarding the user with emails each time a new comment is posted on a post they've subscribed to, I'd like to give them the option to only be notified when they specifically get replied to.

I can develop this myself if need be, in fact, a preliminary search yielding no results seems to point at this.

My question is, what hooks would I take a look at? Looking at other notifier plugins, I see they make use of comment_post and others which I can come up with myself. More specifically, how would I go about knowing if user x got a direct reply?

I understand how the subscription system and all of that would work, my only concern is how to tell if a subscribed user received a direct reply through the built-in commenting system.

1 Answer 1


I figured it out. Each comment row in the wp_comments table has a field named comment_parent which stores the comment_ID of the parent comment. If the comment has no parent, then the default is 0.

So I guess on each comment post I would check the database for the posted comment's parent, and if it matched the comment of a subscriber, notify him or her.

Sounds like a plan.

  • Do have any code Jorge Israel Peña, where you did this. I want to do this same thing but need a bit of help with starting snippet or something. Thanks!
    – Zach Reed
    Commented Mar 7, 2012 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.