# Custom Header Links (icons)

**URL:** https://meta.discourse.org/t/custom-header-links-icons/86307
**Category:** Theme component
**Tags:** official, custom-header-icons
**Created:** [April 27, 2018, 2:00pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307 "2018-04-27T14:00:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [April 27, 2018, 2:00pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/1 "2018-04-27T14:00:38Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Custom Header Links (icons)** will allow you to easily add linked icons to the Discourse header. |
| 👓 | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/custom-header-links-icons) |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-icon-header-links](https://github.com/discourse/discourse-icon-header-links) |
| 📖 | **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

> [@](#):
>
> :discourse2: As this is an #official theme component maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=custom-header-icons "Ask for support on configuring and using Custom Header Links (icons") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=custom-header-icons "A bug report means something is broken, preventing normal/typical use of the theme component") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=custom-header-icons "Discussion about the user interface of Custom Header Links (icons), and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=custom-header-icons "Discussion about how existing Custom Header Links (icons) features can be improved or enhanced, and how proposed new features could work")

### Features

### Screenshots

**Desktop**

 ![Capture3](https://global.discourse-cdn.com/meta/original/3X/9/1/914bac903b1e05b669520d450b2f7f3106459609.PNG)

**Mobile**

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/e/e/eedc0cb90e0b1e786730e85dc910c17c7e88187b.PNG)

### Settings

This component includes a theme setting that allows you to add as many links as you want, determine their icons, and decide which devices they show up on!

| Name | Descriptions |
| --- | --- |
| header links | List of links with the following properties: title, icon, URL, view and target |
| add whitespace | If checked, this will add some whitespace between the default Discourse header icons and the custom icons added via this component |
| Svg icons | Include FontAwesome 6 icon classes for each icon used in the list. |

Notes:

- URL can be absolute ([https://www.example.com](https://www.example.com)) or relative (/c/staff)
- Icons can be any [FontAwesome 6 (free) icon](https://fontawesome.com/v6/search?ic=free) name without the `fa-` ‘fab-’ ‘fas-’ or ‘far-’ parts or an URL to an image.

If the icon you want to use does not show up, then add it to the `svg_icons` setting in the component. If you add new icons, they need to be prefixed with FontAwesome 6 prefixes like fab, far and fas.

### Credits

This is based on @techAPJ’s awesome tutorial here: [(Superseded) Add new link on header beside search icon](https://meta.discourse.org/t/add-new-link-on-header-beside-search-icon/48621), and on @vinothkannans’s Brand header theme which was a great reference for the structure of this component.

  

> :discourse2: **Hosted by us?** Theme components are available to use on our Standard, Business, and Enterprise plans.

> Last edited by @Moin 2025-07-19T08:10:47Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 3, 2020, 6:57pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/88 "2020-08-03T18:57:45Z")

</div>

I’m having a similar issue as a few people mentioned above where the icon is not showing, but I can still click the button. I made the edit to the icon setting so that it says (for instance) “fab-facebook-f” rather than just “facebook-f”. For Twitter and my other website, I have no issues, but for Facebook and LinkedIn, it’s still not working.

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 3, 2020, 7:49pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/89 "2020-08-03T19:49:11Z")

</div>

I figured out Facebook, but still can’t get LinkedIn. Also, is there any way to make a custom icon? Could I upload my company’s logo and use it as an icon?

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [August 5, 2020, 1:52am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/90 "2020-08-05T01:52:58Z")

</div>

> [@MichelleBarnett](#):
>
> I’m having a similar issue

[Me too](https://meta.discourse.org/t/missing-custom-header-link-ico-after-update/159800/3) – with Discord icon.

How come I don’t have ‘svg icons’ section in latest version?

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/5/b56c99dea1727baca6b0b886008b572003dd7f22.png)

I have this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/a/2a61158dfaa657a91039962ea24907fde7da9edf.png)

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [August 5, 2020, 2:24am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/91 "2020-08-05T02:24:31Z")

</div>

That settings screenshot looks like the [Custom Header Links - #84](https://meta.discourse.org/t/custom-header-links/90588/84) component, which is for showing text links not icons.

I can see how the components are named in a confusing way:

- `https://github.com/discourse/discourse-header-links` - icon links (this topic)
- `https://github.com/discourse/discourse-custom-header-links` - text links ([Custom Header Links](https://meta.discourse.org/t/custom-header-links/90588/1))

Maybe you should add icon to this one’s name @Johani?

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [August 5, 2020, 5:46am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/92 "2020-08-05T05:46:39Z")

</div>

Ah this resolved it, indeed. Yep - super confusing. Rename would rock!

**EDIT:** Recent update also seemed to ninja change discord’s class name to include fab- in between it (eg, if you’re wanting to change the icons color; which @OP would make a great native feat - was a bit hard to catch).

---

<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: [August 5, 2020, 1:41pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/93 "2020-08-05T13:41:28Z")

</div>

> [@MichelleBarnett](#):
>
> but still can’t get LinkedIn

For Linkedin you can use `fab-linkedin` as the icon name in this setting

 ![setting for links](https://global.discourse-cdn.com/meta/original/3X/b/9/b90806863496f1203843757d03c169c9868b4e5d.png)

but since that icon is not included in the default set of icons that Discourse uses, you will also need to add it to the other setting in the component.

 ![setting for extra link icons](https://global.discourse-cdn.com/meta/original/3X/b/1/b1f6853f1d5b6f4ce3030736bab7d14f33baa462.png)

The result looks like this for me

 ![linkedin icon](https://global.discourse-cdn.com/meta/original/3X/6/c/6c49eb73bc65a6ad5cc81541550df2deafaf9db5.png)

> [@MichelleBarnett](#):
>
> Could I upload my company’s logo and use it as an icon?

Sure, there’s a section in this topic about adding custom icons.

> [@Introducing Font Awesome 5 and SVG icons](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643):
>
> See also: [We're upgrading our icons to Font Awesome 6!](https://meta.discourse.org/t/were-upgrading-our-icons-to-font-awesome-6/325349) We will shortly merge into master a [branch](https://github.com/discourse/discourse/tree/fontawesome5) that upgrades Discourse to Font Awesome 5.5.0 (the free version) and switches to using SVG icons instead of an icon font. This is a substantial change, with lots of benefits, and one significant change for developers. Here is a quick rundown of the changes: using SVG icons will provide crisper icons, better for accessibility and easier to customize, see [this Github article](https://blog.github.com/2016-02-22-delivering-octicons-with-svg/) for more details since…

Once you have that setup, you’ll be able to use any custom icons you add in this theme component. Please have a look there and let me know if you run into any issues.

> [@awesomerobot](#):
>
> Maybe you should add icon to this one’s name @Johani?

I’ve made that change along with a couple of other implementation improvements here

[https://github.com/discourse-com/discourse-icon-header-links/commit/f6fbef18af2e1a06fcd68c9199df6c337fca2ce9](https://github.com/discourse-com/discourse-icon-header-links/commit/f6fbef18af2e1a06fcd68c9199df6c337fca2ce9)

> [@dylanh724](#):
>
> if you’re wanting to change the icons color

The new update adds unique prefixed classes to each link based on the title you use. So, for example if you use

`facebook, fab-facebook, https://facebook.com, vdm, blank`

the link will have the class

`header-icon-facebook`

The template is `header-icon-ICON-TITLE`

Which you can then target with CSS like so

```scss
.d-header-icons {
  .header-icon-facebook svg {
    fill: #4267b2;
  }

  .header-icon-twitter svg {
    fill: #1da1f2;
  }

  // add more icons here
}

```

which would result in something like this

![colored icons](https://global.discourse-cdn.com/meta/original/3X/b/b/bbffe7def6d0f7448c0e9fc950d2d0d1140f780c.png)

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 5, 2020, 4:51pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/94 "2020-08-05T16:51:24Z")

</div>

Thank you for your help. I tried using “fab-linkedin” in both the “Header Links” and “Svg Icons” categories. As seen in the picture, it is still not working for whatever reason.

 ![Screen Shot 2020-08-05 at 9.48.15 AM](https://global.discourse-cdn.com/meta/original/3X/4/7/47880c743fc67527231cdf8546e89bcfc396a85b.png)

The grey circle is where the LinkedIn logo would be. Any other ideas how to fix it?

---

<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: [August 6, 2020, 12:09pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/95 "2020-08-06T12:09:28Z")

</div>

I’m not entirely sure why that’s not working for. Here are what my settings look like

 ![component settings](https://global.discourse-cdn.com/meta/original/3X/e/8/e80977fa123519c1ecd63467d4d46fc427f09340.png)

```plaintext
Facebook, fab-facebook, https://facebook.com, vdm, blank
Twitter, fab-twitter, https://twitter.com, vdm, blank
LinkedIn, fab-linkedin, https://www.linkedin.com, vdm, blank

```

and

```plaintext
fab-facebook
fab-linkedin
fab-twitter

```

and here’s what I’m seeing

 ![results](https://global.discourse-cdn.com/meta/original/3X/4/7/4761faf440a92d3f6159564169c531bcdb813c8c.png)

Can you please try the same for the linkedin icon and let me know if your issue presists?

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 6, 2020, 5:15pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/96 "2020-08-06T17:15:14Z")

</div>

This is what I have been trying, and I have tried different icons as well. Here is how I have it currently.

Settings:

 ![Screen Shot 2020-08-06 at 10.12.26 AM](https://global.discourse-cdn.com/meta/original/3X/8/7/8771bd04f6c2af1dd8b4cf7854441ee96837a19a.png)

Website:

 ![Screen Shot 2020-08-06 at 10.12.36 AM](https://global.discourse-cdn.com/meta/original/3X/5/d/5d1b0d3dfed7732a053ee1c809071de8a06981d8.png)

The only ones working are the ones that don’t use “fab-”, which seems weird. Let me know your thoughts.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [August 6, 2020, 5:36pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/97 "2020-08-06T17:36:02Z")

</div>

Hi Michelle,

Since you are a customer, I went in and had a look at your site and fixed the issue there for you. I updated the theme component and set the correct settings for the icons, they should all work now.

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 6, 2020, 5:52pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/98 "2020-08-06T17:52:55Z")

</div>

It looks great now, thank you!

---

<div class="post-metadata">

### Author: ![MichelleBarnett](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MichelleBarnett](https://meta.discourse.org/u/MichelleBarnett)
#### Post date: [August 6, 2020, 10:09pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/99 "2020-08-06T22:09:07Z")

</div>

One more question/ request; I initially had these links opening in a separate tab, but now they are opening in the same tab. The setting is already set to “blank”, how else can I change this?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [August 7, 2020, 2:27am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/100 "2020-08-07T02:27:20Z")

</div>

This looks like a regression, we’ll look into it and have a fix soon.

---

<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: [August 7, 2020, 9:09am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/101 "2020-08-07T09:09:39Z")

</div>

> [@pmusaraj](#):
>
> This looks like a regression

Indeed. I accidentally left out the target attribute in the recent changes.

> [@MichelleBarnett](#):
>
> The setting is already set to “blank”, how else can I change this?

No action needed on your side. I fixed the component and updated it on your site. So everything should be all set now. Thanks for reporting the issue 👍

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 25, 2020, 9:13pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/102 "2020-09-25T21:13:25Z")

</div>

Hi,

Custom icons are on the right of the login and sign up button, and I think they would fit better on the left, as they usually are.

![image](https://global.discourse-cdn.com/meta/original/3X/0/1/01de3d93bd1d9680de910dc588fddfb988004483.png)

![image](https://global.discourse-cdn.com/meta/original/3X/9/9/99a434f954b588e92bbed3439d46cf41713ec9fc.png)

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [October 10, 2020, 9:33am UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/103 "2020-10-10T09:33:17Z")

</div>

I can get some version 4.7.0 icons from [Font Awesome Icons](https://fontawesome.com/v4.7.0/icons/) to work just by typing a name (e.g. car) in the correct part of “Header links”. Some icons don’t show (e.g. fa-comments-o). Some don’t need me to use “Svg icons” (e.g. home) and some do (e.g. car).

None of the version 5 icons which I’ve tried from [Find Icons with the Perfect Look & Feel | Font Awesome](https://fontawesome.com/icons?d=gallery) have worked. I’ve put the fa- name into “Header links” and “Svg icons” to no effect. The fab-facebook (etc) icons which were there by default do work though.

What am I doing wrong?

_Edit: I edited the first paragraph for accuracy._

---

<div class="post-metadata">

### Author: ![rolando](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rolando/32/193660_2.png) [@rolando](https://meta.discourse.org/u/rolando)
#### Post date: [October 10, 2020, 12:31pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/104 "2020-10-10T12:31:42Z")

</div>

many thanks for this @Johani . works like a charm and gives me an “aesthetical” solution for linking “back to the site” (in my case)

i did however, encounter an issue since i am also using the [Left side hamburger menu on mobile](https://meta.discourse.org/t/left-side-hamburger-menu-on-mobile/164513) component which ends up breaking everything on that part of the `.d-header`

 ![photo4904701237711186041](https://global.discourse-cdn.com/meta/original/3X/3/4/34ba2b46989096e3f9cc4bd0644a4defee94f1a9.jpeg)

any ideas on how can i make both work? would really appreciate it

---

<div class="post-metadata">

### Author: ![misterjtc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/misterjtc/32/196401_2.png) [@misterjtc](https://meta.discourse.org/u/misterjtc)
#### Post date: [October 11, 2020, 2:06pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/105 "2020-10-11T14:06:26Z")

</div>

I am also having an issue getting my icon to show up. Not sure what I am doing wrong. Here is what I have under settings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/9/e939daaa271c2ca5f105c359295a291a78a223a7.png)

This is what I end up with:

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/3/63ed260de4cd8ee409d09e467141b6e0739dbe58.png)

---

<div class="post-metadata">

### Author: ![rolando](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rolando/32/193660_2.png) [@rolando](https://meta.discourse.org/u/rolando)
#### Post date: [October 11, 2020, 5:14pm UTC](https://meta.discourse.org/t/custom-header-links-icons/86307/106 "2020-10-11T17:14:52Z")

</div>

for the book icon, try without fas-

[Next page](https://meta.discourse.org/t/custom-header-links-icons/86307.md?page=2)
