Disqus has changed over time, since this question was asked. Now in 2021 Disqus uses iframes
with indistinguishable class names and ids. I have found that when it displays ads it displays a minimum of 3 iframes, with the 2nd iframe being the comment section itself, the first iframe and iframes after the 2nd are ads. Also Disqus developers are clever, and on the initial load Disqus only loads 1 iframe, being the comment section itself, and after a small delay ~0.5-1s it loads the ads. So you can't remove them with plain CSS anymore, because your CSS will usually load before the Disqus ads load, so we have to write a function with a delay, that waits for the ads to load. Then remove.
Here is my code sample in JQuery, that works for me on different sites:
const disqus = jQuery('#disqus_thread');
disqus.ready(function() {
setTimeout(function() {
if (disqus.children().length >= 3) {
const comments = disqus.find('iframe:nth-child(2)').detach();
disqus.empty().append(comments);
}
}, 2000);
});
I'm searching for the disqus_thread
id. Then the function waits for 2s. Usually 1.5s is the longest time it takes for Disqus ads to load. So 2s is a safe spot for waiting ads to load. Then I check for how many children elements does the disqus div has. If it is fewer than 3, it means that Disqus didn't load ads, so we don't have to remove any elements. But if 3 or more children is present, we save the 2nd child which is the comment section, then remove every elements inside the disqus div, and reappend the comment section.
This is not the ideal solution. But it has worked for me so far in multiple websites.