# Custom Homepage for Groups

**URL:** https://meta.discourse.org/t/custom-homepage-for-groups/199623
**Category:** Theme component
**Created:** [August 7, 2021, 8:12pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623 "2021-08-07T20:12:05Z")
**Posts on this page:** 20
**Page:** 4

<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: [April 22, 2024, 8:35pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/62 "2024-04-22T20:35:20Z")

</div>

PR welcome. PM me if you have a budget.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [April 26, 2024, 8:40am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/63 "2024-04-26T08:40:17Z")

</div>

Hey Jay, why does this component add `?_discourse_homepage_rewrite=1` to the end of the URL of the page it redirects to?

And also, why does it display a more complex URL (i.e. `mysite.com/t/blahblahblah/2343?_discourse_homepage_rewrite=1`) instead of simply `mysite.com`?

---

<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: [April 26, 2024, 8:59am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/64 "2024-04-26T08:59:43Z")

</div>

> [@nathank](#):
>
> why does this component add `?_discourse_homepage_rewrite=1` to the end of the URL of the page it redirects to?

I don’t know! I don’t know why that would be happening. No one with a budget has complained, but I’ll try to take a look.

---

<div class="post-metadata">

### Author: ![ncaming215](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ncaming215/32/205701_2.png) [@ncaming215](https://meta.discourse.org/u/ncaming215)
#### Post date: [June 29, 2024, 3:58pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/65 "2024-06-29T15:58:26Z")

</div>

Heads up that this is cAsE sEnSiTiVe for any amateurs (like me) who took it took an hour of testing to figure out why it wasn’t working.

 ![Screenshot 2024-06-29 at 11.56.39 AM](https://global.discourse-cdn.com/meta/original/4X/a/0/7/a07bf98bd02bc0fb80117b4a867a2929aa3e9634.png)

---

<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: [June 29, 2024, 5:40pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/66 "2024-06-29T17:40:59Z")

</div>

Always copy-paste!

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [June 30, 2024, 8:47pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/67 "2024-06-30T20:47:19Z")

</div>

It would be a nice touch to make it case-insensitive. It was a revelation to me when I discovered how to bake case-insensitivity into my [Data Explorer](https://meta.discourse.org/t/32566?silent=true) queries!!!

---

<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: [July 1, 2024, 3:59pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/68 "2024-07-01T15:59:39Z")

</div>

I think it should be easy enough to do that, but not something I’m going to fix unless I’m fixing something else.

---

<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 2, 2024, 4:01pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/69 "2024-08-02T16:01:52Z")

</div>

> [@nathank](#):
>
> - @pfaffman tested this with a permalink at `/go-google` that redirects to `https://google.com` and something like `group-name:/go-google`
> - you create Permalinks via the admin settings `/admin/customize/permalinks`

I think this workaround may be broken now. The homepage to permalink external URL I had on a test site broke a while back at some point. The permalink works, but the homepage feature now goes to the oops page for the group map setting. I haven’t had time to figure out why it broke yet, but presumably a core change somewhere. 🤔

---

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [August 19, 2024, 8:56am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/70 "2024-08-19T08:56:52Z")

</div>

Hi  
I got a issue with opening the full chat screen, when I click the full screen chat button, web crushed.  
my setting is like this

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/7/0/c70295f537957b24e43dcd2bc0af2c838ce43018.png)  
I guess the full screen chat url is not compatible with the homepage url

---

<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: [August 19, 2024, 10:26am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/71 "2024-08-19T10:26:31Z")

</div>

> [@Rick\_Jing](#):
>
> web crushed.

What happens?

---

<div class="post-metadata">

### Author: ![Rick\_Jing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rick_jing/32/354677_2.png) [@Rick\_Jing](https://meta.discourse.org/u/Rick_Jing)
#### Post date: [August 19, 2024, 11:36am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/72 "2024-08-19T11:36:59Z")

</div>

![企业微信截图_990a7cf8-3b64-4140-9ccd-019e592fbd86](https://global.discourse-cdn.com/meta/original/4X/6/2/3/62392fdfd3b0f39ade842a68ec1335d2c329d41b.png)  
like this, the page is not showing at the beginning, after clicks it shows the multiple top bar but nothing else  
when I’m not going to full chat screen from the custom homepage, everything is normal

---

<div class="post-metadata">

### Author: ![kOS](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kos/32/441826_2.png) [@kOS](https://meta.discourse.org/u/kOS)
#### Post date: [October 31, 2024, 1:38pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/73 "2024-10-31T13:38:24Z")

</div>

Are we able to add published paged topics as Custom Homepages?

---

<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: [October 31, 2024, 1:46pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/74 "2024-10-31T13:46:41Z")

</div>

You can try, but I think it should work.

I’ve had trouble lately with this theme component and the admin sidebar that I haven’t had time to debug just yet.

---

<div class="post-metadata">

### Author: ![Nathanael](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathanael/32/491728_2.png) [@Nathanael](https://meta.discourse.org/u/Nathanael)
#### Post date: [February 28, 2025, 5:26pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/75 "2025-02-28T17:26:24Z")

</div>

Hello!

First off, let me say _thank you so much_ for this theme component. It’s incredibly helpful, and I wish there was something similar built into Discourse.

I’ve noticed a bug when setting the homepage to a category—if the category is set to “Show subcategory list”, then the subcategory list will not show on the first page load. This issue does not occur if you click the site logo or access the category directly.

Any thoughts on why this might be occurring? I took a look at the source code, but nothing stood out as problematic. I’m guessing it’s some nuance with how those subcategories are rendered.

---

<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: [February 28, 2025, 5:42pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/76 "2025-02-28T17:42:49Z")

</div>

Hey @Nathanael ! Sorry about that. Yes, I’ve noticed–though I think the problem I noticed had to do with something about the sidebar.

It hasn’t (yet!) bothered me enough to fix it and no one has offered a compelling reason (cash is an obvious one, but there could be others) to fix it. I think you’re the first person to complain, but I might just have forgotten.

If you’ve got cash or something else compelling, my email address is in my user card. 🙂

---

<div class="post-metadata">

### Author: ![mrmowji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrmowji/32/505517_2.png) [@mrmowji](https://meta.discourse.org/u/mrmowji)
#### Post date: [June 1, 2025, 8:21am UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/78 "2025-06-01T08:21:37Z")

</div>

Hey @nathank

It seems the “custom default homepage” doesn’t work. I tested with `/latest?order=created`, `c/support/5`, and some other relative URLs.

Then I checked the code. We haven’t used `custom_default_homepage` or even `anon_page` settings anywhere in the code. I used Github search. This is the initializer:

```js
      if (user) {
        if (user.primary_group_name && settings.group_page_map) {
          let groupMap = settings.group_page_map.replace(",", ":").split("|");
          const mapEntry = groupMap.find((value) =>
            RegExp(user.primary_group_name).test(value)
          );
          if (mapEntry) {
            const url = mapEntry.split(":")[1].replace(/^\/+/g, "");
            setDefaultHomepage(url);
            PreloadStore.remove("topic_list");
          }
        }
      }

```

Did I miss something?

Update: I checked [the last commit](https://github.com/pfaffman/discourse-custom-homepage-for-groups/commit/6b325b86cc499f6fbe897d967d8657b61a55f199) and the corresponding logic is deleted. Not sure why though.

---

<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: [June 1, 2025, 12:15pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/79 "2025-06-01T12:15:26Z")

</div>

I really need to get the op to be owned by me, but I’m watching the topic so I guess it doesn’t matter that much.

I’ll try to take a look at this. If you’ve got a budget I might look harder or faster. 😉

---

<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: [June 1, 2025, 12:21pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/80 "2025-06-01T12:21:22Z")

</div>

> [@pfaffman](#):
>
> I really need to get the op to be owned by me

\*_randomly waves her magic wand_

done! 🧙‍♀️

I’m sure Nathan won’t mind 😉

---

<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: [June 1, 2025, 1:01pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/81 "2025-06-01T13:01:58Z")

</div>

~~It’s working for me, and I just upgraded.~~ EDIT: OOOps. I didn’t test anything but the group mappings!

What settings did you use for `Group page map`?

Is it something like this? `todo-users:/c/projects/19`?

Also, in this example, it works only for users that have `todo-users` as their primary group.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [June 1, 2025, 1:24pm UTC](https://meta.discourse.org/t/custom-homepage-for-groups/199623/82 "2025-06-01T13:24:06Z")

</div>

The group map works fine for me, but the other settings seem to be broken.  
For example this doesn’t work for me:

 ![Screenshot_20250601_152232_Firefox](https://global.discourse-cdn.com/meta/original/4X/0/2/a/02a7a5e1c7efea87b46ba76c1cbecd1c2c54ae96.jpeg)

As @mrmowji said, those settings are no longer referenced in the code but still part of settings.yml.

 ![Screenshot_20250601_151933_Firefox](https://global.discourse-cdn.com/meta/original/4X/f/5/5/f5561026f66476fbe6456789e90d8b10c3c20f00.jpeg)

[Previous page](https://meta.discourse.org/t/custom-homepage-for-groups/199623.md?page=3)

[Next page](https://meta.discourse.org/t/custom-homepage-for-groups/199623.md?page=5)
