# Is there a way to make part of a post visible to a user group only?

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584>\
**Category:** Product Support\
**Created:** [July 5, 2023, 5:50am UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584 "2023-07-05T05:50:05Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

The discussion revolves around making part of a post visible to a specific user group only. [kenjdarhan](/t/-/270584/1) wants to achieve this by having a post with contents visible to groups A and B, but with a paragraph only visible to group A.

[simon](/t/-/270584/2) suggests two possible approaches: using CSS to hide content for users not in group A, or publishing the full topic in a subcategory only accessible to group A users. However, [simon](/t/-/270584/2) feels the CSS approach is not secure enough.

[merefield](/t/-/270584/3) shares links to previous discussions on similar topics, including hiding part of a post and showing part of a post only for a specific group.

[pfaffman](/t/-/270584/4) proposes a plugin solution, using a category custom field and callbacks to create an excerpt topic in another category.

[Marty_Downs](/t/-/270584/5) asks if whispers work for groups other than staff or moderators, and [JammyDodger](/t/-/270584/7) responds that whispers are now allowed for other groups, which can be added to the `whispers allowed groups` admin setting.

<div class="post-metadata">

**Author:** ![kenjdarhan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kenjdarhan/32/298019_2.png) [@kenjdarhan](https://meta.discourse.org/u/kenjdarhan)\
**Post date:** [July 5, 2023, 5:50am UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/1 "2023-07-05T05:50:05Z")

</div>

For example, in my category X (visible to groups A and B), I want to post a topic with contents:

```plaintext
**paragraph visible to group A and B (all users who can see category X)**
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

**paragraph visible to only group A**
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

```

The second paragragh should only be visible to group A.

Is there a way I can do that?

Thanks for any help.

---

<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 5, 2023, 7:05am UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/2 "2023-07-05T07:05:04Z")

</div>

> [@kenjdarhan](#):
>
> The second paragragh should only be visible to group A.

I’m interested in doing something similar as a way of enticing users to pay to subscribe to a category. A couple of possible approaches:

- use CSS to hide some of the topic’s content for users who are not in group A

- publish the first paragraph (or whatever seems appropriate as an excerpt) to a topic in a category that’s accessible to both group A and B and publish the full topic to a subcategory that’s only accessible to group A users.

For my case, I don’t think the CSS approach would be secure enough.

Any details you can share about why you are wanting to do this would be helpful.

It would be great to hear other ideas about how to accomplish something like this.

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [July 5, 2023, 7:42am UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/3 "2023-07-05T07:42:08Z")

</div>

> [@Show part of post only for specific group?](https://meta.discourse.org/t/show-part-of-post-only-for-specific-group/137609/2):
>
> No this is not possible.

> [@Hide part of post](https://meta.discourse.org/t/hide-part-of-post/45588/2):
>
> Use the whisper feature… you just add an extra post for mods eyes only.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [July 5, 2023, 8:03am UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/4 "2023-07-05T08:03:42Z")

</div>

> [@simon](#):
>
> publish the first paragraph (or whatever seems appropriate as an excerpt) to a topic in a category that’s accessible to both group A and B and publish the full topic to a subcategory that’s only accessible to group A users.

This seems like a workable solution for a plugin. A category custom field would indicate a category for the excerpt. A `on_create` callback would create the excerpt topic in the other category. A more sophisticated version would use a topic custom field and a `before_save` to track the excerpt topic and could update it when the source was edited.

If you’d like for me to develop such a plugin please contact me.

---

<div class="post-metadata">

**Author:** ![Marty\_Downs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marty_downs/32/288404_2.png) [@Marty\_Downs](https://meta.discourse.org/u/Marty_Downs)\
**Post date:** [July 5, 2023, 5:37pm UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/5 "2023-07-05T17:37:21Z")

</div>

Does whisper work for groups other than staff or moderators? I tried and couldn’t get it to. (I’m on a Discourse-hosted site)

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [July 5, 2023, 6:15pm UTC](https://meta.discourse.org/t/is-there-a-way-to-make-part-of-a-post-visible-to-a-user-group-only/270584/7 "2023-07-05T18:15:44Z")

</div>

Whispers are now group-allowed. 👍 You can add other groups to the `whispers allowed groups` admin setting:

 ![whispers allowed groups](https://global.discourse-cdn.com/meta/original/4X/b/2/0/b202d46a5699dc0bf2137c276d733971f8c4d9fb.png)
