# Hyperlinking headings only works sometimes?

**URL:** https://meta.discourse.org/t/hyperlinking-headings-only-works-sometimes/195109
**Category:** Support
**Created:** [June 26, 2021, 4:26pm UTC](https://meta.discourse.org/t/hyperlinking-headings-only-works-sometimes/195109 "2021-06-26T16:26:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JayCS](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@JayCS](https://meta.discourse.org/u/JayCS)
#### Post date: [June 26, 2021, 4:26pm UTC](https://meta.discourse.org/t/hyperlinking-headings-only-works-sometimes/195109/1 "2021-06-26T16:26:04Z")

</div>

Hi there,

_can anyone give me pointers or workarounds how to get heading-hyperlinks to work reliably?_

I’m stretching all the wonderful things Discourse can do as a power forum user by creating a small database in a forum thread, in which I want to hyperlink each of a few 100 items on about 4 lists with a few others (health: causes, symptoms, treatments, alphabetical).  
I’ve found I can theoretically do this using headings (1-6x#). Trouble is that only works sometimes for me, leads to all sorts of weird and wonderful effects no-one needs, and I can’t find a helpful pattern. And when I say sometimes, I mean an identical link may work once, then never again, without me having changed anything. Or it may mean of 8 identically formated links, 7 may sometimes work, 1 in between never does… 🙃 The 🎆 of technology or am I blind 🙈 ?  
I’ve varied the format in [lots of ways I can think of](https://www.livingwithfibro.org/t/fibromyalgia-references-symptoms-triggers-treatments-to-be-intertwined/13605/24), e.g. empty lines before or after or both, 3 different browsers… (The hyperlink I wanted to use in case you want to see what I’ve tried doesn’t reliably work for me, so you have to scroll down to 2021-06-11 and click on the details “how to hyperlink”.)

[This](https://www.livingwithfibro.org/t/13605/23#b-physicalbody-active-vs-passive-hands-heatcold-devices-24) is sposed to link to one of the headers and only sometimes does, it will hopefully take you to the post or at least thread, that varies too.

> **BTW these are some other hurdles and workarounds I've encountered**
>
> I’d’ve like to used the headings inside of the hiding of details too, but alas… I spose I’ll have to give that dream up.  
> Last hurdle I came across was 32000 characters being the maximum for a post, but hey, I can beat that. Edits ‘only’ being possible for a month I beat by making new posts and deleting old ones.  
> Very last hurdle was only being able to post 2 links in this post… 😉 🙄

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 26, 2021, 7:04pm UTC](https://meta.discourse.org/t/hyperlinking-headings-only-works-sometimes/195109/2 "2021-06-26T19:04:09Z")

</div>

Your links and heading ids must start `heading--` which is in place to stop ‘griefing’, see: [Linking to a heading within a post or topic](https://meta.discourse.org/t/deep-linking-to-headings-anchors/47552)

---

<div class="post-metadata">

### Author: ![JayCS](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@JayCS](https://meta.discourse.org/u/JayCS)
#### Post date: [June 27, 2021, 8:54am UTC](https://meta.discourse.org/t/hyperlinking-headings-only-works-sometimes/195109/3 "2021-06-27T08:54:01Z")

</div>

Thanks, nicely concise pointer…!  
_Many more extra characters_ are then necessary tho (30 per heading, 500 items = 15000), and only 32000 characters per post possible on that forum. Plus 9 for each link, which I haven’t even started on yet (I was dreaming of 2000 🤣). Simple #-headings’dve been better for that… 🙄 I’ve asked my forum-admins if [they could increase the max post length to 150000…](https://meta.discourse.org/t/body-is-limited-to-32000-characters-you-entered-43659/157301). Any further suggestions/ideas on that? Have to rethink the whole linking-dream otherwise, I spose.  
(I’m already deleting all thread titles & my tag out of link-URLs to save character-space.)  
Reading around I found this interesting extra by @RobMeade: [You can also use empty heading tags (but leaves extra “space”).](https://meta.discourse.org/t/html-anchors-not-discourse-bookmarks/77241/7)

(_For dummies like me: 1️⃣ My missing term was ‘anchor’… 2️⃣ ‘ids’ = IDs, had to look up 3️⃣ [griefing here](https://www.urbandictionary.com/define.php?term=griefing). (here: = abuse of styling)_)
