# Header Dropdown navigation menu custom link removes heading anchor from URL

**URL:** https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465
**Category:** Bug
**Created:** [August 16, 2023, 9:07pm UTC](https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465 "2023-08-16T21:07:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jamesgreenblue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesgreenblue/32/286480_2.png) [@jamesgreenblue](https://meta.discourse.org/u/jamesgreenblue)
#### Post date: [August 16, 2023, 9:07pm UTC](https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465/1 "2023-08-16T21:07:03Z")

</div>

**Priority/Severity** :

All / Inconvenient – deffo not an emergency!

**Platform** :

Reproduced in Chrome on desktop and mobile

**Description** :

We’ve just switched over to the new ‘Header Dropdown’ navigation menu.

Our community FAQ includes a custom section to explain how the leaderboard and scoring system works with its own anchor link (`/faq#waves`).

I added this link including the anchor:

 ![Screenshot 2023-08-16 at 20.34.39](https://global.discourse-cdn.com/meta/original/4X/5/8/b/58b192e50931735c4a6720c39d436890bb4b427f.jpeg)

Discourse strips the anchor portion and simply links to `/faq` which defeats the point of tying to link directly to that section. Hoping that this isn’t intentional!

**Reproducible steps** :

1. Change navigation menu type to ‘Header Dropdown’
2. Add another link to `/faq#civilized`
3. Click on the menu link, instead of the specified anchor you are taken to the top of `/faq`

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [August 16, 2023, 10:55pm UTC](https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465/2 "2023-08-16T22:55:00Z")

</div>

i have reproduced and i can confirm that this the case with the navigation menu custom sections in sidebar mode as well.

---

<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: [March 20, 2024, 3:29pm UTC](https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465/6 "2024-03-20T15:29:07Z")

</div>

This fix should allow anchor links to work consistently in the sidebar:

[https://github.com/discourse/discourse/commit/e3cfb1967d531a09b475bba45b33605eabd5a0d8](https://github.com/discourse/discourse/commit/e3cfb1967d531a09b475bba45b33605eabd5a0d8)

---

<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: [March 23, 2024, 8:00am UTC](https://meta.discourse.org/t/header-dropdown-navigation-menu-custom-link-removes-heading-anchor-from-url/275465/8 "2024-03-23T08:00:19Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
