Support » Plugin: Disqus Comment System » Script messing with comment count

  • Specifically: //

    I’m using non-standard HTML to display the comment count, as so:

      '<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">
      <em>0</em> <span><a href="#disqus_thread">comments</a></span>

    But when count.js runs, it changes this to:

    <span class="dsq-postid" data-dsqidentifier="123">
      <em>0</em> <span><a href="#disqus_thread">0 Comments</a></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.