# Link sidebar buttons and scripts

**URL:** <https://meta.discourse.org/t/link-sidebar-buttons-and-scripts/313541>\
**Category:** Development\
**Tags:** sidebar\
**Created:** [June 25, 2024, 11:43am UTC](https://meta.discourse.org/t/link-sidebar-buttons-and-scripts/313541 "2024-06-25T11:43:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [June 29, 2024, 9:09pm UTC](https://meta.discourse.org/t/link-sidebar-buttons-and-scripts/313541/4 "2024-06-29T21:09:11Z")

</div>

You should use the following code in `Head` instead:

```js
<script type="text/discourse-plugin" version="0.8">
    api.addCommunitySectionLink({
      name: "unread",
      route: "discovery.unread",
      title: I18n.t("some.unread.title"),
      text: I18n.t("some.unread.text"),
      icon: "fa-envelope"
    });
</script>

```

`<script type="text/discourse-plugin" version="0.8">` is important if you want to use the API.

That should work better. 👍

---

_[View the full topic](https://meta.discourse.org/t/link-sidebar-buttons-and-scripts/313541)._
