I've created a CPT for a site I'm working on at the moment called "campaigns". I've created a page which displays some content as well a custom loop which displays the most recent Campaign.

Everywhere else on the site I've used Disqus for commenting and I'd like to use Disqus here - but it doesn't seem to display. I've tried modifying the comments code to:

<?php $withcomments = "1"; comments_template(); ?>

but I get the regular comments form, rather than Disqus. Anyone any ideas how to work around that?

Thanks in advance!

8-2-11 - I've found a temporary workaround - which is to overwrite the comments.php file in the theme with the comments file from the plugin - but that means keeping the two in sync, so it would be great if I could find a better solution.

Thanks so much for taking a look - but yes, the CPT does have comments support enabled.
–
Andrew ParkerFeb 8 '11 at 16:22

@Andrew Parker unfortunately I have no other ideas, probably your best option is going over code with debugger (or var_dump()) and trying to figure out why it doesn't load proper template.
–
Rarst♦Feb 8 '11 at 18:13

This is probably stupid and I'm sure you probably checked this beforehand... but it did the trick for me. Turns out, my users had unchecked the "allow comments" option in a lot of my custom posts, and I didn't go ahead and check that first.

Anyway, to debug this maybe you could temporarily modify the disqus plugin in file 'disqus.php' around line 671, you'll find the dsq_comments_template($value) function, which is the one that loads disqus instead of the regular comments.

What I did was check the conditions under which it doesn't load disqus, which are:

Thanks WebMacheter - I did dig around that area of the plugin - I've got a feeling that the disqus swap-out doesn't respect the $withcomments option to trigger the substitution. I'll try your modification when I get a minute.
–
Andrew ParkerApr 29 '11 at 9:13