Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m not seeing the code you’re talking about. Maybe you deactivated the plugin? However, I did find a bug in the disqus plugin in the disqus.php file that may cause code to show up in sliders and front page.

    Remove this block of code at lines 1040 to 1062.

    <script type="text/javascript">
    	// <![CDATA[
    		var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
    		var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
    		(function () {
    			var nodes = document.getElementsByTagName('span');
    			for (var i = 0, url; i < nodes.length; i++) {
    				if (nodes[i].className.indexOf('dsq-postid') != -1) {
    					nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel'));
    					url = nodes[i].parentNode.href.split('#', 1);
    					if (url.length == 1) url = url[0];
    					else url = url[1]
    					nodes[i].parentNode.href = url + '#disqus_thread';
    				}
    			}
    			var s = document.createElement('script'); s.async = true;
    			s.type = 'text/javascript';
    			s.src = 'https://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
    			(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
    		}());
    	//]]>
    	</script>

    Thread Starter julianrin

    (@julianrin)

    Hey, I actually was able to fix it. There is an option to include the javascript in the footer, which has fixed it. Thanks for the reply though.

    Which version of disqus are you using? I’m using 2.61 and I don’t see that option.

    Thread Starter julianrin

    (@julianrin)

    I’m using 2.61 as well. Its on the advanced options page.

    Genius. Worked for me. Thanks for that!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Disqus Comment System] Disqus comment system showing weird code on my page’ is closed to new replies.