# Comment Reply Threading / Linking on the WordPress Side

**URL:** https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711
**Category:** WordPress
**Created:** [October 9, 2017, 7:27pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711 "2017-10-09T19:27:53Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [October 9, 2017, 7:27pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/1 "2017-10-09T19:27:53Z")

</div>

Hi, one major issue I’m having with the WP-Discourse plugin is that comment replies are unclear. When there is a comment reply in Discourse, the WordPress side does not show what it’s a reply to. It’s just a pure flat conversation.

It would be nice to either utilize WordPress’ threading capabilities (unlikely given Discourse’s stance), or at least state “`This is a reply to comment #2`” or something like that.

Is that possible?

Thanks!

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [October 9, 2017, 7:47pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/2 "2017-10-09T19:47:38Z")

</div>

It has been discussed before, so you might search for those conversations; I’d point you to a thread, but it is always mentioned in passing. Get yer search on! 🙂

---

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [October 9, 2017, 7:48pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/3 "2017-10-09T19:48:22Z")

</div>

I couldn’t find it. Was using keywords such as `threaded` and `reply` but that’s obviously not helpful. Will try Google.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 9, 2017, 7:55pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/4 "2017-10-09T19:55:57Z")

</div>

> [@Berto](#):
>
> or at least state “This is a reply to comment #2” or something like that.

I’ll see if there is something that can be done with that.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [October 11, 2017, 8:33am UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/5 "2017-10-11T08:33:58Z")

</div>

Our standard embed script works this way. See Jeff’s blog for example:

> **[Hacker, Hack Thyself](https://blog.codinghorror.com/hacker-hack-thyself/)**
>
> We’ve read so many sad stories about communities that were fatally compromised or destroyed due to security exploits. We took that lesson to heart when we founded the Discourse project; we endeavor to build open source software that is secure and...

---

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [October 11, 2017, 11:18am UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/6 "2017-10-11T11:18:25Z")

</div>

I like that - this could be acceptable. What’s _“our standard embed script”_ though? What you have in WP-Discourse isn’t doing this for me (also tried in default theme, still nothing).

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [October 11, 2017, 6:00pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/7 "2017-10-11T18:00:31Z")

</div>

I _believe_ he’s referring to [Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963).

---

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [December 18, 2017, 11:18pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/8 "2017-12-18T23:18:21Z")

</div>

> [@simon](#):
>
> > or at least state “This is a reply to comment #2” or something like that.
> 
> I’ll see if there is something that can be done with that.

Hi, I’m revisiting this issue. The JS embed isn’t working well enough for my liking, so I’m looking at going back to the comment sync.

Doing some tests, many of our conversations look plain awful without knowing who’s replying to whom. Is there a possibility of getting a bit more clarity with the replies?

Unfortunately, when you are doing the `wp_remote_get` inside of `lib/discourse-comment.php`, using the `best= ____ ` parameter strips out the reply information from your JSON!

Not sure if that’s on purpose or is a bug, but that’s a roadblock on its own.

_Edit: Yet, if you remove the `best` parameter, it doesn’t work with `/wordpress.json` anymore. I can see the problems baked in here for wanting this ‘simple’ change._

Thanks!

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [April 13, 2019, 6:48pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/9 "2019-04-13T18:48:13Z")

</div>

Hello,

I did a search and even though it’s said in this thread this has been discussed elsewhere, I can’t find it. (I also looked at [WP Discourse template customization](https://meta.discourse.org/t/wp-discourse-template-customization/50754) and [WP Discourse Plugin Tips and Tricks](https://meta.discourse.org/t/wp-discourse-plugin-tips-and-tricks/50757).)

I just launched Discourse comments on my Wordpress site, and I’m having the same issue as Berto—without the context of “This is a reply to…” (either name or comment), the comments are a bit challenging to follow. Since I am trying to sell my readership that Discourse is a superior experience to Disqus, and that they should give it a try, it’s not the best look for that.

@simon Did you come up with a solution to this? Do I need to use the the [Javascript embedding](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/)? It’d be great if I could make the conversation flow more clearly like on Coding Horror’s blog. (But I’d really prefer to keep using WP-Discourse, which I love.)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [April 14, 2019, 7:23pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/10 "2019-04-14T19:23:11Z")

</div>

Thanks for bringing this up. I think that improving the way that comments are displayed should be the next thing we focus on for the plugin.

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [April 14, 2019, 7:42pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/11 "2019-04-14T19:42:24Z")

</div>

That would be awesome, @simon.

You already have a super-solid integration with linking the comments between the sites. Having both references to replies (and even active links that move you through the conversation) on Wordpress, like @codinghorror uses on his blog, would be a big benefit. His site, I think, gives a good template to start from and, if necessary, you could tweak the UI from there.

Please let me know if you need any help testing things. I’m happy to offer whatever assistance I can. 🙂

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [April 17, 2019, 6:58pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/12 "2019-04-17T18:58:42Z")

</div>

If improving the way comments are displayed is something you’re going to focus on, I might also ask for a cleaner presentation for when you are quoting previous content.

Quoting is something I’m trying to encourage now in order to have the comments on Wordpress make more sense. But currently the name quoted and the quote itself are separate and styled differently:

 ![2019-04-17_11-50-22](https://global.discourse-cdn.com/meta/original/3X/8/1/8125e2ecb5cfebcd17b4bc33d67ddf7abfd4849f.png)

I think it feels a little disconnected.

It’d be cool if it could match more like how it’s presented in Discourse:

 ![2019-04-17_11-57-41](https://global.discourse-cdn.com/meta/original/3X/6/6/66bc6e08d83d37ee7e81201728ca72917117905a.png)

I don’t know how hard that is to make happen, but my 2 cents anyway. 🙂

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [July 10, 2019, 1:22am UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/14 "2019-07-10T01:22:59Z")

</div>

Hey @simon,

I’m just checking in. I’d still love to see a cleaner presentation of the replies, quotes, and comments on Wordpress.

Have you had any bandwidth to look into that?

I’ll of course understand if you haven’t, but I just wanted to let you know that it’s very much something I’d like to see. I’ve gotten a few more comments from my readers that following the conversation is confusing in the current format, and I think it might encourage more folks to give Discourse a shot on my site if the Wordpress copies were a bit more clear.

Thank you for your great work on this plugin. It’s really awesome. And much appreciated. 🙂

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 27, 2019, 12:12am UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/15 "2019-07-27T00:12:17Z")

</div>

> [@alexwoolfson](#):
>
> I’d still love to see a cleaner presentation of the replies, quotes, and comments on Wordpress.

I am looking into what can be done to either indicate that a comment is a reply, or to add a ‘replies’ link beneath comments that have replies. The data required for this isn’t currently being passed from Discourse to WordPress, but it looks like it can be made available with a fairly small change to Discourse.

> [@alexwoolfson](#):
>
> currently the name quoted and the quote itself are separate and styled differently:

Yes, the default styles for this are not very good. You can improve them by adding this rule to your theme’s CSS:

```css
.comment-body .quote blockquote {
	margin-top: 0;
	margin-right: 0;
}

```

With the WordPress twentyninteen theme, that will give you something like this:

 ![comment](https://global.discourse-cdn.com/meta/original/3X/2/c/2c9de8b3cc54b597e52980a8674bdad4feaac903.png)

The expectation with the plugin is that site’s will style the comments to match their theme, but the styles that are enabled when the Load Comment CSS option is enabled should give a reasonable starting point. I’ll add something like the CSS rule that I posted above to the plugin very soon.

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [October 7, 2019, 5:38pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/16 "2019-10-07T17:38:41Z")

</div>

Hey Simon,

Somehow I missed this. Thank you for the CSS tip! By adding it, I went from:

 ![2019-10-07_10-21-42](https://global.discourse-cdn.com/meta/original/3X/c/b/cb64554f8abdb74176f3746ebdb9a0d1e9a22ce8.png)

to:

 ![2019-10-07_10-26-53](https://global.discourse-cdn.com/meta/original/3X/2/2/222c82ffdd669215db409ab6aa35a004ef2052eb.png)

Which is definitely an improvement. But my theme is still adding that weird border. I’ve tried looking through the CSS, but there are lots of references to “borders” and I’m having a hard time figuring out what’s responsible for that. (My CSS-fu isn’t great.)

Would you have any tips for what to look for in my CSS to get rid of that border so I can more closely match what you were able to do with the twentynineteen theme?

I’ll understand if you don’t. I’ll keep trying to figure it out. But thank you very much for getting me this far with it! 🙂

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 7, 2019, 6:42pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/17 "2019-10-07T18:42:45Z")

</div>

> [@alexwoolfson](#):
>
> Would you have any tips for what to look for in my CSS to get rid of that border so I can more closely match what you were able to do with the twentynineteen theme?

There will be some improvments to the default quote CSS in the next update of the plugin.

This change should work to fix the right alignment of the blockquote and its title on your site. It should also fix the issue with the border. This CSS will be added to the plugin by the end of the week, but there won’t be any harm done by adding the CSS to your site right away:

```css
.comment-body .quote blockquote {
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.comment-body .quote blockquote p:last-child {
	margin-bottom: 0;
}

```

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [October 7, 2019, 9:57pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/18 "2019-10-07T21:57:55Z")

</div>

Thank you so much! That’s awesome! (And I think it’s great that you’ll be adding this to the base plugin.)

I added the code and this is what I got:

 ![2019-10-07_14-54-06](https://global.discourse-cdn.com/meta/original/3X/8/b/8ba4dd397d148c5504a050284e79bf66e5956ad0.png)

Overall, it’s a huge improvement. Thank you so much!

Just one last thing: is there a way to create a little space under the date, like in the comments without the white reply box?

I think having a a little negative space between the date and the edge of the white box could maybe look a little cleaner.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 7, 2019, 10:24pm UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/19 "2019-10-07T22:24:46Z")

</div>

> [@alexwoolfson](#):
>
> is there a way to create a little space under the date, like in the comments without the white reply box?

Yes, I think this is an issue that with your theme. Try adding a CSS rule that’s something like this:

```css
.comment .comment-content {
    margin: 22px;
}

```

You might need to adjust the `22px` value to get the margin to match your site.

There’s another issue with your theme you might want to fix. WordPress uses ordered lists for comments, but uses CSS to remove the numbers from the list. If you don’t want to display numbers next to the comments, try adding a rule similar to this one from the Twentyninteen theme:

```css
.comment-list {
    list-style: none;
}

```

---

<div class="post-metadata">

### Author: ![alexwoolfson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexwoolfson/32/99119_2.png) [@alexwoolfson](https://meta.discourse.org/u/alexwoolfson)
#### Post date: [October 8, 2019, 12:13am UTC](https://meta.discourse.org/t/comment-reply-threading-linking-on-the-wordpress-side/71711/20 "2019-10-08T00:13:16Z")

</div>

Yay! So much better, all around. That CSS did the trick.

Thank you so much, @simon! As always, you rock! 😃
