How to use Disqus for some categories, and FB comments for others?

I didn’t find anything related to what i’m trying to do.

My WP blog have several categories.
For one specific category, in which I publish short news and viral content, I’d like to use Facebook comments as the default commenting system.

For any other categories, i’d like to keep using Disqus as usual.

My problem : since Disqus is taking over with a hook (I guess), how can I have Facebook comments take over instead of Disqus if in_category(x) ? Where would that happen, and how would you do ?

(Ideally, i’d like to deal with it in functions.php instead of having to edit core Disqus plugin files)


Do you need to use the Disqus plugin? ie are you synchronising with WordPress comments (own your own comments etc). If not, it’s easier and quicker to remove the plugin and just edit the comments.php file (the actual file depends on your theme but this is the most likely one).

This answer has the Disqus javascript code and you can get the Facebook code from Facebook’s Developer Site, and then simply do an if-else with in_category(..) as the condition.

Source : Link , Question Author : Baptiste , Answer Author : Community

Leave a Comment