Follow Me

How to Display the Number of Comments Disqus

How to Display the Number of Comments Disqus
How to Display the Number of Comments Disqus - As you know, now disqus no longer supports import and syncronize facilities for the blogger platform. Because Google has updated authentic applications login data access with the latest one, OAuth 2.0. since April 20 2015 ago, while Disqus still uses the old authentic access AuthSub which causes the import and syncronize facilities to not run and will automatically be redirected to the Google error / help page.

Apart from that, on this occasion Arlina Design will give tips on how to bring up the number of Disqus comments in the index page or posting. Tips this time I share because there are bloggers who use the disqus comment system and want to bring up the number of comments in accordance with the comments in the article on their blog.

Ok before, my friend has installed the disqus widget on the blog, if you please follow the steps below:

1. Log in to your Disqus profile> then click the settings icon> Admin> Settings> Install> Universal Code> Then scroll down, find the phrase 'How to display comment count'. Then copy the code just before </ body>

Code example
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'wiendhy';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
The code marked is the user name disqus friend.

2. Next look for comment markups like this (This code is taken from the default Blogger template, for the rest adjust the markup comments of the template you use)
<span class='post-comment-link'>
<b:include cond='data:blog.pageType not in {&quot;item&quot;,&quot;static_page&quot;} and data:post.allowComments' data='post' name='comment_count_picker'/>
</span>

Then replace all the above code with the code below:
<span class='post-comment'><a expr:href='data:post.url + &quot;#disqus_thread&quot;' title='Comments'/></span>
Change the title with the desired word

For users of Minima Colored templates and templates with similar codes, you can use the method below:
<b:if cond='data:post.allowComments'>
<span class='comment-info'>
<i class='fa fa-comments-o'/> <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'> <b:if cond='data:post.numComments == 0'> Add Comment </b:if> <b:if cond='data:post.numComments == 1'>1 Comment</b:if><b:if cond='data:post.numComments &gt; 1'><data:post.numComments/> Comments</b:if>
</a>
</span>
</b:if>

Change the code marked to be like this:
Next Post Previous Post
No Comment
Add Comment
comment url