# Hamburger Theme Selector

**URL:** https://meta.discourse.org/t/hamburger-theme-selector/61210
**Category:** Theme component
**Tags:** end-of-life
**Created:** [April 18, 2017, 7:24pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210 "2017-04-18T19:24:29Z")
**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 18, 2017, 7:24pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/1 "2017-04-18T19:24:29Z")

</div>

> ⚠ This theme component is #end-of-life and is no longer supported
> 
> This theme component no longer works in recent versions of Discourse.  
> Please see [Sidebar Theme Toggle](https://meta.discourse.org/t/sidebar-theme-toggle/242802) as an alternative.

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Hamburger Theme Selector** adds a theme selector in the hamburger menu provided there is more than 1 user selectable theme. This selector works with both logged-on users and anonymous users. |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-hamburger-theme-selector](https://github.com/discourse/discourse-hamburger-theme-selector) |
| 📖 | **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

 ![](https://global.discourse-cdn.com/meta/original/3X/1/6/16ada34132c54804afa4a728b711bda1bffe8c25.png)

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [April 18, 2017, 8:11pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/2 "2017-04-18T20:11:09Z")

</div>

There should be some title or heading(Like Categories in the hamburger)to inform n00bie users that this is the list of user selectible themes.

---

<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: [April 19, 2017, 1:10pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/3 "2017-04-19T13:10:21Z")

</div>

Feel free to form my theme and try it out, not sure about this suggestion cause there is nowhere to link that text. “Categories” actually links to the categories page.

---

<div class="post-metadata">

### Author: ![Jo0Lz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jo0lz/32/121006_2.png) [@Jo0Lz](https://meta.discourse.org/u/Jo0Lz)
#### Post date: [May 16, 2017, 10:44am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/5 "2017-05-16T10:44:42Z")

</div>

Did it break with one of the recent Discourse updates? The menu items still show, but clicking on them doesn’t do anything…

I was thinking of some seperate button (light switch?) or something to make it even easier to switch, something like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/6/c/6c01b5f6222041591adbcb7bd3a138091ed1720e.png)  
Would that be easy to accomplish?

---

<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: [May 16, 2017, 2:55pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/6 "2017-05-16T14:55:16Z")

</div>

> [@Jo0Lz](#):
>
> Did it break with one of the recent Discourse updates?

It sure did, and I just fixed it.

The light switch is doable but would require hardcoded theme keys so its not that easy to share.

---

<div class="post-metadata">

### Author: ![Iceman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iceman/32/181309_2.png) [@Iceman](https://meta.discourse.org/u/Iceman)
#### Post date: [May 20, 2017, 11:12am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/7 "2017-05-20T11:12:52Z")

</div>

Edited to not bother Sam, sorry for the inconvenience.

---

<div class="post-metadata">

### Author: ![Jo0Lz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jo0lz/32/121006_2.png) [@Jo0Lz](https://meta.discourse.org/u/Jo0Lz)
#### Post date: [May 20, 2017, 11:13am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/8 "2017-05-20T11:13:51Z")

</div>

Hey iceman, you can just copy the HTML from the HTML file on the git and add it to the theme HTML 🙃

---

<div class="post-metadata">

### Author: ![Iceman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iceman/32/181309_2.png) [@Iceman](https://meta.discourse.org/u/Iceman)
#### Post date: [May 20, 2017, 11:20am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/9 "2017-05-20T11:20:35Z")

</div>

Thanks a lot, don’t know why I totally forgot about the process… sorry for the inconvenience and my n00bness.

Thanks again.

---

<div class="post-metadata">

### Author: ![Jo0Lz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jo0lz/32/121006_2.png) [@Jo0Lz](https://meta.discourse.org/u/Jo0Lz)
#### Post date: [May 20, 2017, 11:27am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/10 "2017-05-20T11:27:57Z")

</div>

Hey, we’re all here to learn and help, that’s the purpose of this site! 🤙🏼 Glad you got it sorted!

---

<div class="post-metadata">

### Author: ![Sean\_R](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sean_r/32/72433_2.png) [@Sean\_R](https://meta.discourse.org/u/Sean_R)
#### Post date: [May 20, 2017, 5:51pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/11 "2017-05-20T17:51:53Z")

</div>

I added this component and it works well when logged in but when not logged in it refreshes the page without applying the chosen theme. Thought?

---

<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: [May 20, 2017, 6:09pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/12 "2017-05-20T18:09:41Z")

</div>

There is no concept of per-user theming without being logged in, since there is no user in the anonymous case. So the bug is that it should only show up for logged in users.

---

<div class="post-metadata">

### Author: ![Sean\_R](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sean_r/32/72433_2.png) [@Sean\_R](https://meta.discourse.org/u/Sean_R)
#### Post date: [May 20, 2017, 6:11pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/13 "2017-05-20T18:11:17Z")

</div>

OK, that make sense.

This text might need changing then:

> [@sam](#):
>
> This selector works with both logged in users and anonymous users.

---

<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: [May 20, 2017, 6:12pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/14 "2017-05-20T18:12:03Z")

</div>

Hmm yeah I have no idea how this would work with anon users, @sam will have to answer that. Maybe he had some weirdo cookie hack in before for site-wide themes or something.

---

<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: [May 20, 2017, 6:23pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/15 "2017-05-20T18:23:56Z")

</div>

It should work with anon I just need to fiddle with it a bit, the cookie keeps track of the theme

---

<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: [May 24, 2017, 3:39pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/16 "2017-05-24T15:39:58Z")

</div>

A 4 letter regression in core is now fixed 😉

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

Will deploy republic later today @Sean_R

---

<div class="post-metadata">

### Author: ![Neso](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neso/32/73995_2.png) [@Neso](https://meta.discourse.org/u/Neso)
#### Post date: [June 15, 2017, 11:54am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/17 "2017-06-15T11:54:56Z")

</div>

The selector still only works with logged in users… Is it still broken or am I doing something wrong?

---

<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: [June 15, 2017, 1:38pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/18 "2017-06-15T13:38:26Z")

</div>

Great catch, this is fixed now in latest, it was a bug in core. I will backport it to stable.

---

<div class="post-metadata">

### Author: ![Nigel\_Tatschner](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nigel_tatschner/32/68423_2.png) [@Nigel\_Tatschner](https://meta.discourse.org/u/Nigel_Tatschner)
#### Post date: [June 17, 2017, 12:31pm UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/19 "2017-06-17T12:31:34Z")

</div>

Hi All,

I’m being stupid, I’ve added this via the template upload function and it appears in the list but it’s not working.

Please help, i’m being special.

---

<div class="post-metadata">

### Author: ![Neso](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neso/32/73995_2.png) [@Neso](https://meta.discourse.org/u/Neso)
#### Post date: [June 19, 2017, 9:14am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/20 "2017-06-19T09:14:11Z")

</div>

After you import the Hamburger Theme Selector you need to add the Hamburger Theme Selector as a Theme Component.

---

<div class="post-metadata">

### Author: ![Yegor](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yegor](https://meta.discourse.org/u/Yegor)
#### Post date: [October 27, 2017, 9:48am UTC](https://meta.discourse.org/t/hamburger-theme-selector/61210/21 "2017-10-27T09:48:49Z")

</div>

Hi guys!

Our themes do not appear in the hamburger menu, so the users (and the admin aswell) cannot switch between themes. What could be wrong?

[Next page](https://meta.discourse.org/t/hamburger-theme-selector/61210.md?page=2)
