Issues with setting up Discourse with Wordpres

Hello!
I’m super happy of Discourse and the existance of a plugin for Wordpress tough I’m having some issues with comments.

I’have setup everything but there are some stuff that are not completely clear to me.

  1. I have old posts on Wordpress, and if a user wants to comment them, and I don’t have a linked post on Discourse, how does it work?
    Can the user create a new topic on Discourse linked to Wordpress Post or do I have publish from Wordpress to Discourse if I want users to be able to comment?
    Example: Archivi fantastici e dove trovarli (online) - 9minuti.it This post also has old comments that are not visibles because there is not a Discourse post linked.

  2. I have a post on Wordpress with old comments and I would like to have them listed in the Wordpress post and use Discourse for new posts. I saw that Discourse has this option, but the Wordpress form is still visible at the end of the Wordpress post. If I let it in this way people are going to comment in the normal way without usind Discourse…
    Example: Barbero Time, la time line di tutti i video integrali - 9minuti.it

Thank you in advance. I’ve searched on google before asking but I didn’t find anything related.
Alessandro

Hey there, great questions!

You can do either. The key is you need to establish the connection between the two. Once that is there, the commenting functions will work. I’m guessing you know how to do handle the “Publish to Discourse” option, i.e. when the post is created. For the linking option, you can link any Discourse post to a Wordpress Post by using the “Link to Existing Topic” publishing option in the sidebar when you’re editing the Wordpress post.

The key here is that when you have the “Show Existing WP Comments” setting enabled the wp-discourse plugin inserts the Discourse comments (i.e. the posts from the linked topic) on top of the normal Wordpress comment template, which retains all of its normal Wordpress functionality.

This means that one way you can handle this is in your Wordpress theme, by modifying the Wordpress comments.php template. You can do anything with the Wordpress comments using this approach.

However, if coding is not an option you can turn off Wordpress comment compose (or “close” the Wordpress comments) in the Wordpress Admin UI the same way you would normally in Wordpress. Go to “Settings” > “Discussion” and then:

  • For new posts, uncheck “Allow people to submit comments on new posts”.
  • For old posts, set “Automatically close comments on posts older than” to 0.

The upshot of this is that you’ll retain your old comments below the new Discourse comments and the Wordpress comment compose will not be visible.

1 Like

Thank you Angus, I’ll try and then I’ll update the topic.

1 Like