# Category specific Disclaimer

**URL:** <https://meta.discourse.org/t/category-specific-disclaimer/263168>\
**Category:** Development\
**Created:** [April 28, 2023, 10:24am UTC](https://meta.discourse.org/t/category-specific-disclaimer/263168 "2023-04-28T10:24:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![nstoecki42](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nstoecki42/32/75218_2.png) [@nstoecki42](https://meta.discourse.org/u/nstoecki42)\
**Post date:** [April 28, 2023, 10:24am UTC](https://meta.discourse.org/t/category-specific-disclaimer/263168/1 "2023-04-28T10:24:35Z")

</div>

Hi,

I tried to add a Disclaimer on a specific Category. I had the Idea to have a “banner” - like  
`This is User's first post - let's welcome the new member to our community!`  
or  
`It's been a while since we've seen USER - the last post was 1 year ago.`  
above each Post.

I tried to archive this with:

> **common/head\_tag.html**
>
> ```js
> <script type="text/discourse-plugin" version="0.8">
> api.decorateWidget('post:after', (helper, args) => {
> if (args.topic.category_id === 51) { // My Category
> const $post = helper.find('.cooked');
> const disclaimerText = api.decorateCooked(helper, args, settings.MY_DISCLAIMER);
> $post.prepend(`<div class="disclaimer">${disclaimerText}</div>`);
> }
> });
> </script>
> 
> ```

Just to be complete here is the

> **settings.yml**
>
> ```yml
> MY_DISCLAIMER:
> type: string
> default: 'This is a Category that comes with limited warranty and is to be used at your own risk.'
> description: Disclaimer Text for Category
> 
> ```

and there is also `common/common.scss` with the `.disclaimer` class in it.

But when I active that the Post itself is no longer shown, the content area is just blank.

Thanks for any help!

---

_[View the full topic](https://meta.discourse.org/t/category-specific-disclaimer/263168)._
