Template hook for Discourse Plugin "Join Discussion Link" section?

I see where I can change the link text itself when the ‘Link to Comments Without Displaying Them’ option is selected, but is there a way to add text/html above/below this link? Sort of like the discourse_replies_html filter but for altering what is inside the .wpdc-join-discussion div and where the Join Discussion Link would go in there.

Hey Kayla, there’s currently no filter or template to change the html in the wpdc-join-discussion div. Could you share your desired outcome, i.e. what html you’d like to end up with? I’ll see if I can add a filter in to support your (and perhaps others’) use case.

Hi Angus,

The use case is for the same website as

so there’s private Discourse comments alongside the public Wordpress comments on a site using a classic theme. I’d like to be able to add a heading and some text explanation above the Join Discussion Link for context/user experience. I’m able to fake it visually with a theme-default widget area that comes after the post entry and a bunch of CSS, but it’s not ideal document structure-wise (in this case the widget gets picked up as part of the article in reader view/mode, while the actual .wpdc-join-discussion div doesn’t). I could create a new widget area that sits outside the article layer, but this customization logically belongs inside the .wpdc-join-discussion div along with the Join Discussion Link.

Ok, thanks, I’ll look at supporting this use case in the next version.

1 Like

Thanks for the consideration! I’d prefer an open-ended type of solution like discourse_replies_html so I could have the flexibility of adding an internal “wrapper” div inside .wpdc-join-discussion or whatever else is needed in the future. I hope that keeps it simple from a plugin development standpoint as well (no new admin interface settings).

1 Like