WordPress.org

Support

Support » How-To and Troubleshooting » Email after comment is posted – How to add comment ID in subject?

Email after comment is posted – How to add comment ID in subject?

  • All the e-mail notices for comments get saved into one conversation by gmail, which is extremely annoying.

    Is there any way I can add the comment ID in the subject of the e-mails?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • open this file…

    wp-admin/wp-email-notification/index.php

    find the line where the email’s subject is generated, (Ctrl+F type subject into firefox).

    Then simply add the following line inside that line (if you’re adding it into <?php tags then don’t write them again!)…

    <?php echo " - " . the_ID(); ?>

    Erm, won’t that just print out the id on the HTML page?

    And I don’t have that file. All I found was wp-mail.php and nowhere could I find a line which mailed the admin after comments.

    OKAY, good and true, sorry, wasn’t with it on that one! how about this:
    in the file:

    ./wp-includes/pluggable-functions.php

    find line 359 which reads…

    @wp_mail($admin_email, $subject, $notify_message);

    Right before this line, add the line

    $subject = $subject . " - " . $comment->comment_post_ID;

    THIS SHOULD DO IT!

    Nope doesn’t work 🙁 I just get the same subject as I used to. Even the “-” doesn’t show up in the subject :s

    bump?

    Bump again -.-

    Someone much know how to get this done.

    Bump again?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Email after comment is posted – How to add comment ID in subject?’ is closed to new replies.