How to Make Disqus Notify the Post Author When a New Comment Is Posted?

By default, in a multi-authors blog, you can get WordPress to notify the post author when a new comment is posted. To do this, you just have to update the “Email me whenever” field in “Settings -> Discussion”.


Now if you are using Disqus as your comment system, you will find that it won’t notify the author when a new comment is posted. Instead, it will only notify the moderators.

To fix this, go to the Disqus-Comment-System folder in the Plugins directory. Open the disqus.php in a text editor. Scroll down to line 289 where you see the following:

$comment_id = $commentdata['comment_ID'];
update_comment_meta($comment_id, 'dsq_parent_post_id', $comment->parent_post);
update_comment_meta($comment_id, 'dsq_post_id', $comment->id);

Add in the line “wp_notify_postauthor($comment_id);” so that it becomes:

$comment_id = $commentdata['comment_ID'];
update_comment_meta($comment_id, 'dsq_parent_post_id', $comment->parent_post);
update_comment_meta($comment_id, 'dsq_post_id', $comment->id);

Save, upload and replace the file back to the server.

That’s it. It should notify your authors whenever there is a new comment.

Published by


Damien Oh is the owner and chief editor of WP Daily Bits

97 thoughts on “How to Make Disqus Notify the Post Author When a New Comment Is Posted?”

  1. Wow, this is fantastic. This has been my biggest frustration since switching to Disqus – my authors no longer have any idea when anybody comments on their posts. This will fuel replies + author esteem.

  2. Awesome Damien! I was looking for this and I thought to drop a feedback at disqus help center. But this hack is working fine. I think disqus developers should see this post!

    Thanks again. :D

  3. Do you know how to make it send a notification to both the admin *and* the author? I like to see all the comments, but I also want the authors to see the ones from their posts.

    Thanks for this great tip!

  4. great!!!! i am just about to write to disqus, you're the man! this is very crucial for multiauthors blog!

  5. I've tried this on my multiauthor blog but it doesn't work. I'm not aware that checking the "Email me whenever" boxes will send notifications to post authors – for me that has only ever sent the emails to "me" – the blog administrator. Is there another plugin I should be using, or a function to put in my functions.php file?

  6. Checking the "Email me whenever anyone posts a comment" will send an email notification to the author when a comment is posted. However if you are using Disqus, it will replace the conventional comment system, thus bypassing the email to authors feature.

  7. awesome thanks a lot ! I dont understand why this isnt integrated in Disqus … would make things easier.

    But I suppose this uses WordPress traditional comments mails so we kinda loose one of Disqus cool features : the ability to reply by email to a comment :)

  8. Yes, you are correct. By inserting the above code, the admin will receive mails from Disqus, while the authors will receive mails from wordpress.

  9. exactly, I find your fix very useful , its just very sad that Disqus doesnt do anything to help in that regard :/

    I asked them on Twitter but they dont seem to reply to everybody ..

  10.  hey dude! not seem to work very well. I have just received e-mail alerts on new comments. the other authors are not getting. I did exactly as the post says, but really dont work. what is happening? I need to configure anything on my Disqus dashboard?


  11. Open the disqus.php file and search for the line

    update_comment_meta($comment_id, ‘dsq_post_id’, $comment->id);

    Insert the line


    below it. Save and reupload the file. It should work.

  12. This is helpful, thanks for posting Damien. It’s too bad that DISQUS doesn’t have more hooks to work with, Ideally it would be great to have this in my functions.php file, or even better as an option in the admin.

  13. Thanks for writing this @4706cc8b40c3544c75b82104d4af1f38:disqus . Sorry no one on our team saw this (way) earlier.

    After taking a look at the proposed code change (which is a pretty neat hack) this actually isn’t something we’re able to include as a feature in our plugin.

    To elaborate a bit: in Disqus each thread of comments has only one author just like each post in WordPress has only one author. By default each thread in a Disqus forum has the same author: the primary moderator of that forum (i.e., the person who registered the forum on Disqus). Authors in Disqus can only be changed using our Author-specific moderation add-on.

    The code change provided here doesn’t actually change the author of the thread in Disqus nor does it send a Disqus notification; it sends WordPress notifications to the author of the post in WordPress. Sending a Disqus, rather than WordPress, notification would require changing the thread’s author in our system.

    That said, I’ve added this to our internal list of features and, should we perform any fundamental refactoring on our author infrastructure, we’ll re-visit adding this feature. Don’t hesitate to reach out to us at and any time with any further questions, thoughts, or sweet hacks. And thanks again for putting this doc together!

  14. Hi Tyler,

    Thanks for coming over to comment and answer the question.

    I didn’t look into the full structure of the disqus plugin, so I am not sure how it works. However, as an editor for a multi-author blog, I must say that the author comment notification is very important to me (and many other multi-authors blog) and this hack is very necessary. I do appreciate if you can look into the issue and see if you can provide a workaround for this.

  15. Thanks to your and Disqus’ stance on pseudonyms, I’ve had the opportunity to communicate with creative minds from around the globe and across social hierarchies.Keep this sweet writing continue with more updates.Well done.

  16. Thanks for the good hack point. I am also struggling with one issue bt unable to find any solution, we have multiple author blog with some of the author not registered with us.So we add a custom field to there post (email) and based on this email we able to recognize the author.
    Unfortunately this will not work in Disqus since we want to highlight the comment of the post author but i have not seen a way how Disqus find information about post’s author or can we tweak it so that we can tell Disqus who is the post author.
    If the email id of the post’s custom field matches with the email id of the commentator we can flag/tell Disqus that this person is actually is the post’s author.
    We are using wordpress

  17. This is really exciting – it’s been a huge need on the site I manage. I currently just have to forward all comments to their respective authors.

    One problem though… it’s not working! I wish I could elaborate more than that – but even with the added hack, the authors are still not receiving emails. Our site is built on the Genesis theme – would that have anything to do with it? Are there any WP Settings that I need to make sure are set up the right way? Let me know if I can provide you with any more pertinent information.

  18.  It has been working well for me all the while and I am using it on several sites as well. The only problem I can think of is that either the author email address is not properly set, or your server’s mail system is not working.

  19. Hi Damien, I´ve used your code and it was working fine, also with the new DISQUS 2012, but now it isn´t working anymore, do you know how to bypass it?

  20. Nope, that´s the problem, with Disqus 2012 I think it doesn´t need more updates on the plugin. Because they make the changes and it goes live!

  21.  I have upgraded to Disqus 2012 and the notification continues to work. Theoretically, it should work as long as Disqus sync the comments to your site.

  22. Disqus 2012 does not currently support a couple callbacks, which in turn are causing part of the code to not process and this includes the syncing action. We’re adding support in for those callbacks soon  which will allow the syncing action to fire again and notifications to send. Sorry about the delay guys. cc @GuiLoureiro:disqus 

  23.  Hi Tyler, thanks for dropping us to add a comment. I am excited and impressed with Disqus 2012, but I hope it doesn’t introduce more problems. Thanks for the hard work.

  24. Hi Tyler, I just read today in Disqus website that “Callbacks are now supported in Disqus 2012″. However, notification still doesn’t work in my site.

  25. Hi Damien, is there some news about this problem? 
    Notification still doesn’t work
    Thank you

  26. Also, from what I understand, wp_notify_postauthor($comment_id); will send an email using the wordpress system which won’t allow authors to use disqus features. Am I correct?

  27.  Yes. It should still work. You have to paste the code “wp_notify_postauthor($comment_id);” at the end of line 354 for the latest version (2.73).

  28. How do users get to see follow up comments though if they login with Twitter or Facebook? I’ve just upgraded to Disqus 2012 and users are telling me that they are not getting notified of reply comments if they log in with a social network as opposed to commenting as a guest, adding an email address and ticking the box to get comment responses. Am I missing something?

  29. This was working fine till a couple of weeks back, but not anymore. Just to be clear, the plugin has not been updated and the code is still present in disqus.php

  30. Thank you for the info on this particular issue. I’ve tried the code you gave but for some reason the comment author doesn’t get notified about my reply to their comment, I get the email notification. Did i do something wrong? Should I have placed the code while the plugin was deactivated? I did it while it was active.

  31. Damien, this is an awesome hack, thank you. I also use Disqus for articles on the non-WP part of my site. How can I “set” the author so they get notified of comments on their articles, too?

  32. Sorry, let me explain. I have a multi-author blog, done in WordPress (Wp). I also have additional content (e.g., articles) that is managed through a content management system, and I have Disqus installed for comments on those articles as well. Each article has a specific author as well.

    Does that make more sense?

  33. If you place Disqus in the article managed by other CMS, then your comment won’t be synced to the WordPress database, so you can’t fire a “Email author” event. You might have to look into other CMS how it manage author notification.

  34. Ok, thanks. I can get Disqus to notify the admin at least, and then we can manually notify the author. We get most of our comments on the blog anyway. Thanks for looking into it!

  35. It’s a seriously needed feature. Comments on my multi-author blog nose-dived after I switched to Disqus. I had no idea why; and I concluded that folks simply didn’t enjoy the system.

    Then, today, one of the authors mentioned in passing that he no longer receives comment notifications, so his engagement with my site dwindled.

    I spent an hour looking through the Disqus documentation and not finding even a mention of this issue. Maybe you need to include this work-around into your help files, at least.

    I’m so happy I’ve found this instruction above, as I was just about to delete Disqus from my system. As much as I love your software, my audience is more important to me, haha.

  36. Glad to hear you were able to at least find the documentation here. Sorry to hear you couldn’t at — if you remember what keywords/phrases you searched for, feel free to email me and I can help make that documentation more visible.

  37. Thanks, Tyler. I believe I searched for “email notifications”, “comment notifications”, “author” and things like this. All the links I found were bringing me back to how to toggle my own notifications within the Disqus system.

  38. I’ve been looking for a solution to this for days also, notifications being sent to us (the owners) are useless, they need to be sent to the post authors (multi author, public, blog)

  39. A better question. How are trolls able to delete comments on disqus and who are NOT moderators while they do it?

  40. Is there a way to prevent duplicate comment notifications? Whenever I perform this hack, I start receiving comment notifications from Disqus and from WordPress.

  41. I have this change implemented and it’s working great. The one question I have is this. I am receiving two different emails notifying me of comments when i write a post myself. One from Disqus and one from WordPress. Is there a way to turn the WordPress comment notification off for my own posts?

  42. Hello, since I could not find a way to make this work, would you mind helping me about this workaround? I have tried to include the code on line 355 (vs 289) but it still does not work. Is there something I have to do in the discussion settings of wordpress to make it work? Thank you for your help!

  43. Also, didn’t mean to bash you Damian :) Your post gave me an idea of how to cut 10+ lines of code out of my plugin by using the wp_notify_postauthor function instead of recreating its functionality myself :)

  44. Thank you @jcederberg:disqus for your plugin. It doesn’t seem to work – only the moderator receives an email (from Disqus) and the author doesn’t. Also, I don’t see the new comment in Comments > All Comments like I did with previous comments left on Disqus. Can you shed some light on this issue?

  45. Hey Yaniv, could you be more specific at least with regard to your WordPress version and your version of the Disqus plugin? You’re the first one saying it doesn’t work.

    For me, notifications come through ok and the plugin does not affect the way Disqus imports comments back to WP.

    Is your site a one-person blog/site or multiple authors? If one-person, is the email address in their WP profile correct? If multiple-user site, do all users report the same behavior as you?

  46. I manually synced Disqus with WP, and after a while the email arrived to the author. I thought this would be immediate, but it’s not. How does it work? Do the comments get synced once in a while automatically through some kind of cron job and then the email is sent?

  47. The plugin isn’t working for me either. Currently using WP 3.3.1 and Disqus version 2.72.

  48. The Disqus plugin posts comment data back to your WP instance on a slight delay, this is by design on Disqus’s part. I usually see Disqus push the comments back to WP within ~5-7 minutes.

  49. Does it not work at all or do the notifications arrive with a few minutes delay? The delay is by design, I can’t do anything about it as it is dependent on Disqus pushing comments back to your WP. But in case it doesn’t work at all, unfortunately I don’t currently have time to fix it for WP3.3, sorry. In case you do fix it yourself, throw me a pull request on GitHub :)

  50. Nope doesn’t work at all. I upgraded to the latest WP v3.9.1 and still doesn’t work. Using Disqus 2.72.

  51. I’ve only tested with version 2.74 of the disqus plugin (or whatever it says on the github page) and don’t know about other versions. Does the plugin crash? The problem could also be elsewhere like your server or WP not being correctly configured to send email. Also have you checked that the notification emails don’t go into spam?

  52. Hi Janne, thank you very much! I’ll try to install it next week and will let you know if it works! Can’t wait to see it in action! It’s still weird that Disqus did not think about this! Best,

  53. The plugin talked about in the thread and found here works great for me. Was going to edit the PHP but didn’t want to have to everytime I upgraded the plugin.

  54. Can anyone help? I use Disqus on a regular website. I built our CMS on SQL/php backbone. I’d like our authors to be notified if there is a comment on their article. We have numerous authors and it’s not feasible to give 300+ authors admin access to our Disqus account.

Comments are closed.