Title: Script messing with comment count
Last modified: October 20, 2016

---

# Script messing with comment count

 *  [Will Woodward](https://wordpress.org/support/users/willjw/)
 * (@willjw)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/script-messing-with-comment-count/)
 * Specifically: _//xxx.disqus.com/count.js_
 * I’m using non-standard HTML to display the comment count, as so:
 *     ```
       comments_number(
         '<em>0</em> <span><a href="#disqus_thread">comments</a></span>',
         '<em>1</em> <span><a href="#disqus_thread">comment</a></span>',
         '<em>%</em> <span><a href="#disqus_thread">comments</a></span>'
       );
       ```
   
 * This will format the HTML as so:
 *     ```
       <span class="dsq-postid" data-dsqidentifier="123 http://site.com/?p=123">
         <em>0</em> <span><a href="#disqus_thread">comments</a></span>
       </span>
       ```
   
 * But when _count.js_ runs, it changes this to:
 *     ```
       <span class="dsq-postid" data-dsqidentifier="123 http://site.com/?p=123">
         <em>0</em> <span><a href="#disqus_thread">0 Comments</a></span>
       </span>
       ```
   
 * Notice it’s changed the text inside the `<a>` element, so now the number of comments
   is duplicated and the word itself is capitalised.

The topic ‘Script messing with comment count’ is closed to new replies.

 * ![](https://ps.w.org/disqus-comment-system/assets/icon.svg?rev=1636350)
 * [Disqus Comment System](https://wordpress.org/plugins/disqus-comment-system/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/disqus-comment-system/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/disqus-comment-system/)
 * [Active Topics](https://wordpress.org/support/plugin/disqus-comment-system/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disqus-comment-system/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disqus-comment-system/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Will Woodward](https://wordpress.org/support/users/willjw/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/script-messing-with-comment-count/)
 * Status: not resolved