WordPress.org

Forums

Disqus Comment System
[resolved] DISQUS - issue with Woothemes Canvas (2 posts)

  1. jasonday
    Member
    Posted 4 years ago #

    Below shows on Woothemes Canvas Slider -
    I've had issues in the past with cdata showing in odd places in canvas theme. In slider and in a custom page template.

    Thoughts?
    http://jasondaydesign.com

    2 // <![CDATA[
    3 var disqus_shortname = 'jasondaydesign';
    4 var disqus_domain = 'disqus.com';
    5 (function () {
    6 var nodes = document.getElementsByTagName('span');
    7 for (var i = 0, url; i < nodes.length; i++) {
    8 if (nodes[i].className.indexOf('dsq-postid') != -1) {
    9 nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel'));
    10 url = nodes[i].parentNode.href.split('#', 1);
    11 if (url.length == 1) url = url[0];
    12 else url = url[1]
    13 nodes[i].parentNode.href = url + '#disqus_thread';
    14 }
    15 }
    16 var s = document.createElement('script'); s.async = true;
    17 s.type = 'text/javascript';
    18 s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
    19 (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
    20 }());
    21 //]]>
  2. jasonday
    Member
    Posted 4 years ago #

    Nevermind, I checked the Woothemes forum and the solution is to go to the Disqus admin in WordPress, click Advanced Settings in the upper right (On my widescreen I never even saw this option until it was pointed out) and check "Output JavaScript in footer".

    Voila.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Disqus Comment System
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic