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.