# Discourse Persistent banner

**URL:** <https://meta.discourse.org/t/discourse-persistent-banner/330575>\
**Category:** Theme component\
**Created:** [October 12, 2024, 1:41pm UTC](https://meta.discourse.org/t/discourse-persistent-banner/330575 "2024-10-12T13:41:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [October 12, 2024, 1:41pm UTC](https://meta.discourse.org/t/discourse-persistent-banner/330575/1 "2024-10-12T13:41:56Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | A persistent banner is shown at the top of every page that can only be hidden by Admins. |
| 👓 | **Preview** | [Theme Creator](https://discourse.theme-creator.io/theme/NateDhaliwal/persistent-banner) |
| 🛠 | **Repository** | [GitHub - NateDhaliwal/discourse-persistent-banner: A theme component for Discourse that cannot be closed by the user. · GitHub](https://github.com/NateDhaliwal/discourse-persistent-banner) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

This component displays a banner at the top of every page. Any valid CSS colours can be used. If you are planning to use discourse theme variables, wrap them in `var()`, so you’ll get something like `var(--tertiary-very-low)`.

 !["The image shows a social media platform interface with a post from a user named 'Discourse Theme Creator' who has received a welcoming message from another user." (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/1/2/412830df7becd5ae472cc081e85583979a40e051.jpeg)  
 ![This image displays a social media news feed, with a mix of text, images, and interactive elements. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/a/3/0/a30e3618220c6492a5413d881a43ceac047167e8.jpeg)

There are 7 settings to control the banner.

1. `banner_background_color` changes the background color of the banner.
2. `banner_text_color` changes the text color of the banner.
3. `banner_border_color` changes the border color of the banner.
4. `banner_border_thickness` changes the border thickness of the banner.
5. `banner_text_content` changes the text of the banner. The text will wrap in the banner if it is longer than 1 line.
6. `banner_visible` changes the visibility of the banner. `show` to show the banner, `hide` hides the banner.
7. `banner_location` places the banner at 1 of the 4 outlets given: `above-site-header`, `below-site-header`, `above-main-container` and `before-topic-list`.

Special thanks to @Lilly for helping out to sort out the files!

---

_[View the full topic](https://meta.discourse.org/t/discourse-persistent-banner/330575)._
