Can I embed a dynamic private message in WordPress post?

AI-generated summary

The discussion revolves around embedding a dynamic private message in a WordPress post. Himanshu_Singh is using private messages for discussions between group members and wants to display these discussions on a custom ‘group’ post in WordPress.

Himanshu_Singh explains that he is creating a custom post called ‘group’ in WordPress for people to work together on projects, and only the people associated with this group post can see it. He wants to allow them to have a conversation without creating a chat/discussion system in WordPress, instead leveraging Discourse.

angus responds that this is not possible out of the box and questions why private messages are being used instead of topics in a category. Himanshu_Singh clarifies that he wants to provide a safe space for young professionals to connect without being judged by other members.

angus suggests restricting permissions in a category to a group, but Himanshu_Singh explains that this would require creating a lot of groups, which would be unmanageable. He also asks if Discourse has nested groups, which angus confirms is not a feature.

angus advises Himanshu_Singh to test his approach with one group first and consider changing the product design or doing custom coding in WordPress and Discourse.

Hey all,

I am using private messages for discussion between members of a group. I am creating a unique group message per group as an admin so members with trust level 0 can reply to the private message and have a discussion.

This works fine on the discourse side but it would be really nice to show the private discussion on the ‘group’ post in WordPress.

Ideal scenario:

  • Create a unique custom post of type ‘Group’ in WordPress.
  • Create a group private message in Discourse (I am doing this manually but can this be done programmatically based on the group post in WordPress)
  • Embed the group private message on the Group post.

Is this possible?

The short answer is that this is not possible out of the box (i.e. you’d need to create a solution yourself). The longer answer starts with a few questions:

  • why are you using PMs instead of a topics in a category?
  • if this is private why (and if so, how?) do you want to display them on a wordpress post?

Angus,

Thank you for the quick response.

I am creating a custom post called group in WP for people to work together on projects. Only the people associated with this group post can see the post.
This group would be working together for 2 months and I want to allow them to have a conversation. I don’t want to create a chat/ discussion system in WP just for this and want to leverage Discourse instead.

Topics vs PMs in Discourse
I am not sure how to create a private topic for every ‘group’ post in WP and dynamically give access to only certain people to read and edit. Although it’s a manual process, I know how to create a private message and use it as a proxy for a topic. Is there a way to create a private topic with dynamic user restrictions on creation of a custom post in WP?

Why private?
Because these are young professionals looking to build their skills by working together on a project. I want to provide them a safe space to connect without being judged by other members on the platform.
I want to display the thread (message or topic) only on the related ‘group’ custom post in WP i.e. one post in WP will have one private thread which should be visible to the people in the group.

Restrict the persmissions in a category to a group (Category Settings > Security)

Why do you need a post in WP at all? Why not just post the project details in Discourse?

Perhaps you could start this initiative just posting the project details on Discourse (i.e. the simplest approach), and then if you find you really need the project details on wordpress too, you can think about this integration project?

I am aware of this but I would need to create a lot of groups. Imagine 100 different group, managing those would be a nightmare. If Discourse had nested groups, it would have been easy to make this happen like this

  1. Create a group projects category
    2.Create a Project-Work Group and assign it to Group Projects Category
  2. Add subgroups - Group 1, Group 2, Group 3,…
  3. Create a private topic and assign to the right sub group.

This way people on the sub group will be able to discuss a specific project while keeping all discussions related to group project within 1 category. Am I right to assume that Discourse does not have nested groups?

This is a complicated product where group post type has parent/child relationship with other post types in WP. Discussions are part of much bigger feature set, majority of which is already on WordPress. Therefore, the integration is important.

No, Discourse does not have nested groups.

You won’t be able to run this in the way you’re envisioning with the default feature set. You’ll either have to change the product design or do some custom coding in Wordpress and Discourse.

I would suggest you try this with just one group first to validate your basic assumptions, even if you think the initial approach won’t scale. You may find you need to change your product design before you scale it.