I need to hide Disqus comments on password-protected posts until users enter the correct password. I’ve already contacted Disqus about this… first they told me to enable the disqus_developer variable. So I added this to header.php in WordPress:
<script type="text/javascript">
var disqus_developer = 1; // developer mode is on
</script>
But that didn’t do anything. Then Disqus support told me:
You would have to add some logic to your code that doesnât load Disqus
unless the password is entered. This is something you would need to
customize in your theme/template.
They gave no direction on how to accomplish this. What do I need to do?
Just edit plugins/disqus-comment-system/comments.php and add the following code somewhere at the beginning of that file: