# Optional Mobile Title Header

**URL:** https://meta.discourse.org/t/optional-mobile-title-header/104238
**Category:** Theme component
**Tags:** mobile, official, mobile-title-header
**Created:** [December 14, 2018, 4:02am UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238 "2018-12-14T04:02:41Z")
**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: [December 14, 2018, 4:02am UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/1 "2018-12-14T04:02:41Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Optional Mobile Title Header** makes the feature where the header switches to mobile title optional for both users and sites. |
| 👓 | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/optional-mobile-title-header-switch) |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-optional-title-mobile-header](https://github.com/discourse/discourse-optional-title-mobile-header) |
| 📖 | **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=mobile-title-header "Ask for support on configuring and using Optional Mobile Title Header") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=mobile-title-header "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=mobile-title-header "Discussion about the user interface of Optional Mobile Title Header, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=mobile-title-header "Discussion about how existing Optional Mobile Title Header features can be improved or enhanced, and how proposed new features could work")

### Features

When disabled per user prefs → interface:

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

User will see the standard header **unconditionally** :

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

When enabled the behavior of “switch to title on scroll down” remains:

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

**As an admin** in the theme component section you can control if this is default off or on:

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

### Current Caveats

1. User setting is only persisted **per device** in local storage.

2. User must reload site after changing setting

3. Not properly localized or localizable.

### Settings

| Name | Description |
| --- | --- |
| default enabled | Enable switching header to topic title on mobile |

| Translation | Default |
| --- | --- |
| mobile\_switch\_title | Switch header to topic title on scroll |

  

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

> Last edited by @JammyDodger 2024-06-13T22:16:25Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [December 18, 2018, 4:28pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/2 "2018-12-18T16:28:50Z")

</div>

Do hosted discourse instances have the option to install this component? I sent this to the admin of the site I use, but he’s having trouble getting the setting to show up for users.

> **[New Discourse menu changes](https://community.wanikani.com/t/new-discourse-menu-changes/34209)**
>
> @viet @oldbonsai If you install this theme component for Discourse, users will be able to change the topic header on mobile back to the old version. While the new version nicely shows you the current topic’s title, it makes it hard to quickly see...

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 18, 2018, 4:29pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/3 "2018-12-18T16:29:55Z")

</div>

There is no restriction on the use of this theme component (or any theme component) on hosted sites. I can take a look shortly.

---

<div class="post-metadata">

### Author: ![viethoang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viethoang/32/119620_2.png) [@viethoang](https://meta.discourse.org/u/viethoang)
#### Post date: [December 18, 2018, 4:34pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/4 "2018-12-18T16:34:29Z")

</div>

> [@sam](#):
>
> When disabled per user prefs -\> interface:
> 
> [![image|219x375](https://global.discourse-cdn.com/meta/original/3X/2/6/26470a94e2f5a98a4019dbd287a544114af55061.png)](https://global.discourse-cdn.com/meta/original/3X/6/6/6631e81baefb79177adbd041474190cffb938078.png)

To follow-up on @seanblue. The theme component installs without issue. I can see the component on the Theme list in Admin. We aren’t seeing the User \> Preference \> Interface option as seen in the quote.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 18, 2018, 4:35pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/5 "2018-12-18T16:35:06Z")

</div>

Have you added the theme component to the active theme(s)? Theme components do nothing themselves unless they’re part of a theme.

---

<div class="post-metadata">

### Author: ![viethoang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viethoang/32/119620_2.png) [@viethoang](https://meta.discourse.org/u/viethoang)
#### Post date: [December 18, 2018, 4:37pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/6 "2018-12-18T16:37:47Z")

</div>

Nope. I did not. Adding them to the active themes did it! Thanks for the assistance and education.

---

<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: [January 30, 2019, 12:36pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/7 "2019-01-30T12:36:39Z")

</div>

Hmm, this doesn’t seem to be working, anymore.

I installed it fine, I see the component, I added it successfully to all themes \>\> Nada.

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

---

<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: [January 30, 2019, 12:37pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/8 "2019-01-30T12:37:38Z")

</div>

@david can you test this out?

---

<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: [January 30, 2019, 1:11pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/9 "2019-01-30T13:11:12Z")

</div>

@dylanh724 what issue are you seeing here? This theme does nothing on Desktop, so you’ll only see the new option on mobile.

Previously it was necessary to manually refresh the site for the setting to take effect, but I just [fixed that](https://github.com/discourse/discourse-optional-title-mobile-header/commit/ef3e5d4ff290a141d301f237e2d7f0a848be1d76).

---

<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: [January 30, 2019, 3:27pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/10 "2019-01-30T15:27:26Z")

</div>

> [@david](#):
>
> what issue are you seeing here?

Users cannot select this in options because the field does not exist.  
 ![image](https://global.discourse-cdn.com/meta/original/3X/e/9/e98d71c1b120a84849bf8efdf731703945838b57.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/4/348e7ba0e5dcaaac1b52e5558a72f34279e9306c.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: [January 30, 2019, 3:28pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/11 "2019-01-30T15:28:26Z")

</div>

Are they looking for the setting on mobile, or on desktop? Are you able to share a link to the community?

---

<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: [January 30, 2019, 3:29pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/12 "2019-01-30T15:29:39Z")

</div>

There’s also supposed to be an admin option, right?

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

[https://forum.imperium42.com](https://forum.imperium42.com)

> Are they looking for the setting on mobile, or on desktop? Are you able to share a link to the community?

Tried both

---

<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: [January 30, 2019, 3:34pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/13 "2019-01-30T15:34:11Z")

</div>

I just signed up quickly, and I can see the setting in the user preferences on mobile:

 ![09](https://global.discourse-cdn.com/meta/original/3X/4/9/49f872fcf7105373b74ddc3ceee562f9614291ca.png)

> [@dylanh724](#):
>
> supposed to be an admin option

Yep, that is located in the themes area. Find the page for the component, and then find the “theme settings” section at the bottom of the page. There’s a screenshot of it in the OP:

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

---

<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: [January 30, 2019, 4:03pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/14 "2019-01-30T16:03:14Z")

</div>

I can’t see it all – I wonder if this only works for new accounts? There’s a friend helping me test and he can’t see the option, either. I’m testing desktop, he’s testing mobile.

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

I did, however, find the theme option within the component (thanks):  
 ![image](https://global.discourse-cdn.com/meta/original/3X/b/6/b6cac8dbf8a64473672edf6dfde7153c4624ac9b.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: [January 30, 2019, 4:05pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/15 "2019-01-30T16:05:30Z")

</div>

It definitely will not appear on Desktop. Is it possible that your friend has switched to Desktop view on his mobile?

---

<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: [January 30, 2019, 4:06pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/16 "2019-01-30T16:06:17Z")

</div>

> [@david](#):
>
> It definitely will not appear on Desktop

You keep saying this as if the option doesn’t show on desktop – or is this intended that you can only selection this OPTION when on mobile (rather than the event happening only on mobile, which I understand)?

---

<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: [January 30, 2019, 4:07pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/17 "2019-01-30T16:07:03Z")

</div>

Correct, you can only toggle the setting when using the mobile device. The theme component does absolutely nothing on Desktop.

---

<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 12, 2019, 3:16am UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/18 "2019-04-12T03:16:32Z")

</div>

@pmusaraj I think some of your recent changes broke this.

@tgxworld when you are done if you need a theme to test the new user selectable stuff this is a great one!

---

<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: [April 12, 2019, 1:41pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/20 "2019-04-12T13:41:20Z")

</div>

Fixed, this now works with latest core.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 18, 2026, 12:17pm UTC](https://meta.discourse.org/t/optional-mobile-title-header/104238/21 "2026-07-18T12:17:20Z")

</div>

FYI:

```plaintext
Admin Notice] Theme 'Optional Mobile Header Title Switch' contains code which needs updating. (id:discourse.static-viewport-initialization) (learn more)

```

[Next page](https://meta.discourse.org/t/optional-mobile-title-header/104238.md?page=2)
