Active
Project:
Disqus
Version:
2.0.1-alpha5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
21 Jun 2017 at 16:47 UTC
Updated:
3 May 2022 at 20:02 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedmachour created an issue. See original summary.
Comment #2
maria.dis commentedHi, did you find a way to do it?. I'm loking for the same solution. Thanks
Comment #3
gaurav.kapoor commentedYou can use the attribute 'data-disqus-identifier' with a link in the twig file to display the count of comments. Take a hint from the way views field plugin this module provides the count link.
Comment #4
chikeFollowing the hint at #3. This code
<a href="{{ url }}#disqus_thread" data-disqus-identifier="node/{{ node.id }}">Comments</a>showed the comments count on a site where I am also showing the comment count in views on the homepage and on the /blog page using the views field plugin.
On a different site where I am not using the views field plugin anywhere, the comment count is not shown. For the code to work I had to follow the instructions here https://help.disqus.com/en/articles/1717274-adding-comment-count-links-t... and add the following code at the bottom of my Twig template file,
<script id="dsq-count-scr" src="//EXAMPLE.disqus.com/count.js" async></script>Comment #5
damienmckennaThis should be something the module can do out of the box instead of having to customize a twig file to do it.