# Hoe reageer je alleen voor bepaalde categorieën?

**URL:** https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029
**Category:** Development
**Tags:** reactions
**Created:** [2 juni 2023 om 08:08 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029 "2023-06-02T08:08:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [2 juni 2023 om 08:08 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029/1 "2023-06-02T08:08:14Z")

</div>

What would be the best approach to enable/disable this on a per category basis? We’d like to have a more complex “polis-like” mechanism in some selected areas of our social intranet, but don’t want to detract from the welcoming and positive nature of “just likes” for the rest of the categories.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2 juni 2023 om 15:38 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029/2 "2023-06-02T15:38:57Z")

</div>

There is no such feature. A quick way to do it would be to hide the reactions selector with CSS, such as:

```css
.category-general-resources .discourse-reactions-picker {
    display: none;
}

```

If you want to iterate through multiple categories and make it easier to maintain, you can use a SCSS loop like this:

```scss
$categories: 'general', 'site-feedback', 'staff';

@each $category in $categories {
  .category-#{$category} .discourse-reactions-picker {
    display: none;
  }
}

```

The category class is visible in the `<body>` tag.

It can be circumvented by any user that knows how to make it visible again client-side, but if your community is well-behaved, I think it’s a good workaround. 🙂

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2 juni 2023 om 20:06 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029/3 "2023-06-02T20:06:17Z")

</div>

Have you looked at some other options in discourse to achieve what you want, such as:

> [@Discourse Topic Voting](https://meta.discourse.org/t/discourse-topic-voting/40121):
>
> discourse2Summary Discourse Topic Voting gives the ability to vote on topics in a specified category.[[1]](#footnote-173202-1)open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features To enable it, edit any category, look on the settings tab for the “Allow users to vote on topics in this category” checkbox: Once enabled, a “Votes” item is available in the top menu. The topics in that category can be voted on w…

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [13 juni 2023 om 09:16 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029/4 "2023-06-13T09:16:59Z")

</div>

> [@Canapin](#):
>
> There is no such feature. A quick way to do it would be to hide the reactions selector with CSS, such as

This worked surprisingly well, thank you very much for this approach.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [13 juli 2023 om 09:17 UTC](https://meta.discourse.org/t/how-to-enable-reactions-only-for-certain-categories/267029/5 "2023-07-13T09:17:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
