Posted By

mjenos on 08/06/12


Tagged

comments bc disqus


Versions (?)

disqus


 / Published in: HTML
 

  1. Copy and paste the following embed code anywhere into your page.
  2.  
  3. <div id="disqus_thread"></div>
  4. <script type="text/javascript">
  5. /**
  6. * var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
  7. */
  8. (function() {
  9. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  10. dsq.src = 'http://mjmediastudio.disqus.com/embed.js';
  11. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  12. })();
  13. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=mjmediastudio">comments powered by Disqus.</a></noscript>
  14. <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
  15.  
  16.  
  17. Copy the following comment count code and paste it right before the closing </body> tag.
  18.  
  19. <script type="text/javascript">
  20. var disqus_shortname = 'mjmediastudio';
  21. (function () {
  22. var s = document.createElement('script'); s.async = true;
  23. s.src = 'http://disqus.com/forums/mjmediastudio/count.js';
  24. (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
  25. }());
  26.  
  27.  
  28. Append #disqus_thread to the end of permalinks. The comment count code will replace the text of these links with the comment count.
  29.  
  30. For example, you may have a link with this HTML: <a href="http://example.com/my_article.html#disqus_thread">Comments</a> The comment count code will replace the text "Comments" with the number of comments on the page http://example.com/my_article.html

Report this snippet  

You need to login to post a comment.