Notify commenter regarding reply (3 posts)

  1. inprojectcloud
    Posted 3 years ago #


    I want to code into my origin wordpress theme the ability to notify a commenter regarding a reply they received for their comment.

    I do not want to use a plugin since that will just increase the loading time,etc.

    Any hints?

    My site: http://projectcloud.info/

  2. bcworkz
    Posted 3 years ago #

    You need to hook some comment filter or action, perhaps the 'pre_comment_approved' filter for example, and get the comment parent's email address, if it exists. If it exists, send the email. The comment parent ID is available from $commentdata['comment_parent'] and $_POST['comment_parent']. With the parent ID, you can use get_comment(), the returned value will have the email address with the keyname 'comment_author_email'.

  3. inprojectcloud
    Posted 3 years ago #

    Rightly said. A bit complicated. I'm using a plugin while working on a code. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic