# Categories in "top menu"?

**URL:** https://meta.discourse.org/t/categories-in-top-menu/41718
**Category:** Support
**Created:** [3월 29, 2016, 6:02오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718 "2016-03-29T18:02:29Z")
**Posts on this page:** 20
**Page:** 1

<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: [3월 29, 2016, 6:02오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/1 "2016-03-29T18:02:29Z")

</div>

I’ve already read some topics about custom links, and I understood that discourse does not allow such thing. BUT, how could “this site” (here) have got these links? (look this screen)

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

Links:

- Bugs redirect to:  
[https://meta.discourse.org/category/bug?order=op\_likes&status=open](https://meta.discourse.org/category/bug?order=op_likes&status=open)

- Features redirect to:  
[https://meta.discourse.org/category/feature?order=op\_likes&status=open](https://meta.discourse.org/category/feature?order=op_likes&status=open)

Could someone tell me how to add that to my site, please?

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [3월 29, 2016, 6:22오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/2 "2016-03-29T18:22:52Z")

</div>

Check here: [https://meta.discourse.org/t/best-way-to-customize-top-menu/35336/3](https://meta.discourse.org/t/best-way-to-customize-top-menu/35336/3)

(have not used this myself, assuming it still works - bookmarked it for future use 🙂 )

---

<div class="post-metadata">

### Author: ![tomwrench](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomwrench/32/54576_2.png) [@tomwrench](https://meta.discourse.org/u/tomwrench)
#### Post date: [3월 29, 2016, 6:23오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/3 "2016-03-29T18:23:56Z")

</div>

Those are category links. To achieve this, in the topmenu settings, put ‘category/CategoryName’.

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

---

<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: [3월 29, 2016, 6:45오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/4 "2016-03-29T18:45:20Z")

</div>

@tomwrench, thats works BUT redirect to “category name”.  
Not with the custom link like:  
`?order=op_likes&status=open`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [3월 29, 2016, 6:48오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/5 "2016-03-29T18:48:57Z")

</div>

The link @Yuun posted works, just teste here with order=likes.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 29, 2016, 9:27오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/6 "2016-03-29T21:27:13Z")

</div>

See also the topic on your site entitled “READ ME FIRST: Admin Quickstart Guide” way down under “customize logos and colors.” If I understand correctly that’s what you’re looking for and the link above is more complicated than you need it to be.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [3월 29, 2016, 11:38오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/7 "2016-03-29T23:38:32Z")

</div>

The “quick start” way works, but could probably benefit with a little styling.

The “best way” code works well

And there are two plugin-outlets that could come in handy.

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

---

<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: [3월 30, 2016, 2:44오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/8 "2016-03-30T14:44:37Z")

</div>

Nice try, but here in Discourse someone from staff could tell me how they put that links? I don’t think that is plugins ☹

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [3월 30, 2016, 3:20오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/9 "2016-03-30T15:20:22Z")

</div>

> [@SidV](#):
>
> I don’t think that is plugins

Not a plugin.

The post linked to in the first reply _is_ a post made by a Discourse Team member.

What is it about that post you don’t understand?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 30, 2016, 6:34오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/10 "2016-03-30T18:34:12Z")

</div>

You know the URLs that you want to link to, right? You just want to add those links to the top of your page? I’m pretty sure that this is what you’re looking for. Go to admin/settings/customize/css and put in the links you want. Below is an example.

From: “read me first: quick admin guide” on your site (it requires admin access, so I can’t link to it here)

> [@](#):
>
> You can also specify custom CSS and custom HTML headers/footers to further customize the look. One common request is a navigation header that takes you back to the parent site. Here is some example HTML to put in Customize, CSS/HTML under “Header”:
> 
> \<div id=“top-navbar” class=“container” style=“padding:5px 0 0 5px”\>  
> \<a href=“[http://example.com](http://example.com)”\>Home\</a\> |  
> \<a href=“[http://example.com/about/](http://example.com/about/)”\>About\</a\> |  
> \<a href=“[http://example.com/news/](http://example.com/news/)”\>News\</a\> |  
> \<a href=“[http://example.com/products/](http://example.com/products/)”\>Products\</a\> |  
> \<a href=“[http://blog.example.com/blog](http://blog.example.com/blog)”\>Blog\</a\> |  
> \<a href=“[http://forums.example.com/](http://forums.example.com/)”\>Forums\</a\>  
> \</div\>

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [3월 30, 2016, 7:31오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/11 "2016-03-30T19:31:04Z")

</div>

He doesn’t want an additional header, he wants custom links integrated into Discourse’s internal nav menu, e.g. how there is a “Bugs” nav item on meta that links to the Bugs category’s open topics sorted by likes.

AFAIK the only way to accomplish this is with the javascript in the link I posted in my reply above, all that’s required is a little editing to swap in the correct links, then paste it into `<body>` in admin/customize. Not sure what the confusion is all about.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 30, 2016, 7:53오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/12 "2016-03-30T19:53:28Z")

</div>

> [@Yuun](#):
>
> He doesn’t want an additional header, he wants custom links integrated into Discourse’s internal nav menu

Oops. My bad. I read too fast. I knew that I had customized the top menu and hadn’t remembered that I’d used only stock items (e.g., bookmarks, my posts) there. Me culpa.

---

<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: [4월 6, 2016, 7:56오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/13 "2016-04-06T19:56:54Z")

</div>

> [@Yuun](#):
>
> He doesn’t want an additional header, he wants custom links integrated into Discourse’s internal nav menu, e.g. how there is a “Bugs” nav item on meta that links to the Bugs category’s open topics sorted by likes.

That’s correct 👍 ❗

> [@Mittineague](#):
>
> The post linked to in the first reply is a post made by a Discourse Team member.
> 
> What is it about that post you don’t understand?

All right, so that `JS code` is what discourse uses here (now) ?

Thanks!

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [4월 6, 2016, 8:33오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/14 "2016-04-06T20:33:19Z")

</div>

> [@SidV](#):
>
> so that JS code is what discourse uses here (now) ?

I can;t say for certain as I’m not an Admin here.

But it looks like “Bugs” and “Features” are being added that way.

Why don’t you try doing it and see for yourself first-hand ?

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [6월 7, 2018, 10:54오전 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/15 "2018-06-07T10:54:09Z")

</div>

> [@tomwrench](#):
>
> Those are category links. To achieve this, in the topmenu settings, put ‘category/CategoryName’.
> 
> ![](https://global.discourse-cdn.com/meta/original/3X/9/d/9d773c7d7facad8a04748686e12c1902d5bcbcc4.png)

Is this still supposed to work? I can’t seem to get it to work:

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

At the same time, I still have it working on another forum where I added a link to the help category to the top menu last year and it still displayed there, and when I search site settings for help, the top menu settings come up, indicating that help is still there somehow, but it’s not displayed:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/7/07139f7346b06df1a30ac8b70ffff7e94ae314ed.png)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [6월 7, 2018, 11:14오전 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/16 "2018-06-07T11:14:47Z")

</div>

> [@tophee](#):
>
> Is this still supposed to work?

It was changed here:

> [@Invalid items can be added to the top\_menu setting](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074/9):
>
> I am mostly done here but kind of want to hand this over to @j.jaffeux to finish some stuff up here: Per: [https://github.com/discourse/discourse/commit/88f5251415650f875817c3b3d4a73987a6cd270a](https://github.com/discourse/discourse/commit/88f5251415650f875817c3b3d4a73987a6cd270a) We have an extra allow\_any attribute for site setting (default is true). If allow\_any is set to false on a list, the choices are restricted so they always match the list. So for this case, top\_menu is now restricted to any combination of: choices: - latest - new - unread …

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [6월 7, 2018, 11:28오전 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/17 "2018-06-07T11:28:59Z")

</div>

I’m not sure I entirely understand the changes

> [@Invalid items can be added to the top\_menu setting](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074/9):
>
> We have an extra `allow_any` attribute for site setting

I can’t find that site setting. Is it only in the site `site_settings.yml`?

> [@Invalid items can be added to the top\_menu setting](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074/9):
>
> (default is true). If `allow_any` is set to `false` on a list, the choices are restricted so they always match the list.

If defauklt is true (and I haven’t changed it), shouldn’t it still be working?

---

<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: [6월 7, 2018, 11:34오전 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/18 "2018-06-07T11:34:20Z")

</div>

You can use this theme to add custom links to the top menu:

> [@Custom Top Navigation Links](https://meta.discourse.org/t/custom-top-navigation-links/87225):
>
> discourse2Summary Custom Top Navigation Links allows you to add links to Discourse top navigation.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/custom-top-navigation-links)hammer_and_wrenchRepository Link [https://github.com/discourse/Discourse-nav-links-component](https://github.com/discourse/Discourse-nav-links-component)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 Desktop Mobile Settings: …

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [8월 20, 2018, 12:47오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/19 "2018-08-20T12:47:44Z")

</div>

It seems doesn’t work now.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [8월 20, 2018, 11:12오후 UTC](https://meta.discourse.org/t/categories-in-top-menu/41718/20 "2018-08-20T23:12:18Z")

</div>

If you need categories in the top menu you would use @Johani’s

> [@Categories in "top menu"?](https://meta.discourse.org/t/categories-in-top-menu/41718/18):
>
> You can use this theme to add custom links to the top menu:

The post above the post you posted 😳

[다음 페이지](https://meta.discourse.org/t/categories-in-top-menu/41718.md?page=2)
