# Plugin: add a menu icon (next to search)

**URL:** https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136
**Category:** Plugin
**Tags:** deprecated
**Created:** [16. August 2017 um 08:13 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136 "2017-08-16T08:13:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [16. August 2017 um 08:13 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/1 "2017-08-16T08:13:33Z")

</div>

If you’ve always wanted to add an extra icon, next to the search, here’s your chance! 🙂

 ![](https://global.discourse-cdn.com/meta/original/3X/f/4/f42c88f7a777be0ea1e6cc288da170b4ece709b5.png)

Installation as usual, link:  
[https://github.com/VonLion/discourse-menu-icon.git](https://github.com/VonLion/discourse-menu-icon)

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [16. August 2017 um 12:51 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/4 "2017-08-16T12:51:43Z")

</div>

This is great ! Thanks!

If someone has a site using this, please tell me.

I’m translating this. 👍

- Spanish PR: [https://github.com/VonLion/discourse-menu-icon/pull/1](https://github.com/VonLion/discourse-menu-icon/pull/1)

* * *

> ✨ An idea @Bas, maybe besides “title”, you can add `alt` title to image too?  
> Same setting for `menu_icon_title`, I think it’s here: _[initializers/menu-icon.js.es6#L16](https://github.com/VonLion/discourse-menu-icon/blob/master/assets/javascripts/discourse/initializers/menu-icon.js.es6#L16)_

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [16. August 2017 um 13:05 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/5 "2017-08-16T13:05:57Z")

</div>

Hey @SidV,

Just merged the pull requests, thanks!

Alt text isn’t necessary I think; it’s a font icon and the link already has an `aria-label` which is enough for screenreaders 🙂

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [16. August 2017 um 13:08 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/6 "2017-08-16T13:08:34Z")

</div>

> [@Bas](#):
>
> Alt text isn’t necessary I think

You’re right, I was confused!  
Sorry for the idea, `alt` would not serve here. **I agree with you**.

---

<div class="post-metadata">

### Author: ![Tom\_Newsom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_newsom/32/115981_2.png) [@Tom\_Newsom](https://meta.discourse.org/u/Tom_Newsom)
#### Post date: [16. August 2017 um 13:14 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/7 "2017-08-16T13:14:51Z")

</div>

Excellent 🙂

Feature Request: Multiple buttons!

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [16. August 2017 um 13:19 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/8 "2017-08-16T13:19:22Z")

</div>

> [@Tom\_Newsom](#):
>
> Feature Request: Multiple buttons!

Yeah, figured it wouldn’t take long before that was requested, haha.

Thing is, I don’t know how to do this 😃 The current plugin is a pretty straightforward modification of the [excellent plugin tutorial](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515) by @eviltrout

I don’t know how to create an “add icon” button that spawns multiple fields; I know it can be done, since the navigation plugin does so, but I’m pretty new at this and I just created this one out of a personal need and to learn.

I might take a crack at this during a weekend somewhere, until then.. PRs are welcomed 🙂

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [16. August 2017 um 13:31 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/9 "2017-08-16T13:31:13Z")

</div>

For multiple buttons are some ideas here: [(Superseded) Add new link on header beside search icon](https://meta.discourse.org/t/add-new-link-on-header-beside-search-icon/48621) by @techAPJ👏

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [16. August 2017 um 14:38 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/10 "2017-08-16T14:38:55Z")

</div>

Heh, that thread is actually the other part of the code I stole 🤫

---

<div class="post-metadata">

### Author: ![allu](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@allu](https://meta.discourse.org/u/allu)
#### Post date: [13. Januar 2019 um 08:24 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/11 "2019-01-13T08:24:54Z")

</div>

Thanks for this plugin. Unfortunately, it doesn’t seem to work under 2.2.0.beta7. Despite enabling, no icon appears.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [13. Januar 2019 um 09:56 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/12 "2019-01-13T09:56:42Z")

</div>

I don’t think a plugin should be necessary for this in our brave new world of theming..

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [13. Januar 2019 um 10:00 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/13 "2019-01-13T10:00:42Z")

</div>

> [@codinghorror](#):
>
> I don’t think a plugin should be necessary for this in our brave new world of theming…

👍 we have a theme component that does this now @allu. have a look here

> [@Custom Header Links (icons)](https://meta.discourse.org/t/iconified-header-links/86307):
>
> discourse2Summary Custom Header Links (icons) will allow you to easily add linked icons to the Discourse header.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/custom-header-links-icons)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-icon-header-links](https://github.com/discourse/discourse-icon-header-links)open_bookNew 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 Features Screenshots Desktop Mobile Settings This component includes a …

@Bas Thanks for creating this plugin! Since the component essentially does the same thing that this plugin is supposed to do, I’m moving this plugin to the #plugin:broken-plugin category.

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [13. Januar 2019 um 10:00 UTC](https://meta.discourse.org/t/plugin-add-a-menu-icon-next-to-search/68136/14 "2019-01-13T10:00:53Z")

</div>


