How to display a disclaimer to every topic in a category?

I would like to display a disclaimer to every topic in a category. Such as “Nothing in this forum is financial advice, and all the posts here are for entertainment purpose only.” What is the best way to do this?

1 Like

have a look at category banners

1 Like

Thanks! However this theme component seems not ideal for a boring legal disclaimer…

1 Like

Hey there

I’d recommend this theme component as its displayed at the bottom of the page its less intrusive but easily readable.

1 Like

I needed to do something like this myself recently, so used a custom theme component:

<script type="text/discourse-plugin" version="0.8">
api.decorateWidget("post:before", helper => {
    const { iconNode } = require("discourse-common/lib/icon-library");
    let topic = helper.widget.model.topic;
    if (topic.category_id == 6 && topic.tags.includes('stub')) {
        let text = "This page is a stub. You can help by ";
        text += helper.attrs.canEdit ? "adding to it." : "suggesting additions.";
      return helper.h("div.post-notice", [iconNode('book-open'), text]);
    }

});
</script>
2 Likes