# Created Topic Sort

**URL:** https://meta.discourse.org/t/created-topic-sort/321521
**Category:** Theme component
**Created:** [August 13, 2024, 8:03pm UTC](https://meta.discourse.org/t/created-topic-sort/321521 "2024-08-13T20:03:28Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [August 13, 2024, 8:03pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/1 "2024-08-13T20:03:28Z")

</div>

| | | |
| --- | --- | --- |
| :information_source: | **Summary** | Adds a sortable created date column to the topic list |
| :eyeglasses: | **Preview** | [https://discourse.theme-creator.io/theme/Alteras/created-topic-sort](https://discourse.theme-creator.io/theme/Alteras/created-topic-sort) |
| :hammer_and_wrench: | **Repository** | [GitHub - Alteras1/discourse-created-topic-sort: Discourse theme component adds topic sorting by created date · GitHub](https://github.com/Alteras1/discourse-created-topic-sort) |
| :question: | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| :open_book: | **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

This adds a sortable created date column to the topic list. Also adds an optional “Created” tab to the navigation bar.

On desktop view, a whole column is added. On mobile, the created date is only added inline with the activity date when the “Created” sort is selected (see screenshots below).

> :information_source: Before using this component, it may be good to evaluate your community’s need for knowing a created date. There’s already a built in way for auto flagging newly created topics within a certain time period (customizable by users in Preferences \> Tracking \> Topics).

## Settings

### Enable Sort by Created Date Nav Bar Item

Adds a “Sort by Created Date” nav bar item to the navigation menu. Default: `true`

> **Screenshots**
>
> **Desktop**
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/8/c/3/8c37d53619915d63cb0e9fefab19970bf3769a36.png)
> 
> **Mobile**
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/c/5/9/c59f2dca1862ed5c5b1d67220a1acaa8ddb7056a.png)

### Enable Column on Created Date Filter Only

Prevents the created date column from being displayed outside of the Create Date filter. Requires the “Enable Sort by Created Date Nav Bar Item” to be true. Default: `false`

### Enable Nav Bar Item in Home Page

Add the “Sort by Created Date” nav bar item in the home page. Default: `true`

### Enable Column in Home Page

Add the “Created” column in the home page. Default: `true`

### Categories to Display Nav Bar Item

List of categories to display in the “Sort by Created Date” nav bar item. Leave empty to display in all categories. Default: `empty`

### Categories to Display Created Column

List of categories to display the “Created” column. Leave empty to display in all categories. Default: `empty`

### Tags to Display Nav Bar Item

List of tags to display the “Sort by Created Date” nav bar item. Leave empty to display in all tags. Default `empty`

### Tags to Display Created Column

List of tags to display the “Created” column. Leave empty to display in all tags.  
Default: `empty`

### Nav Bar Item Before

Adjust where the nav bar item is positioned in the list. Default: `top`.

## Screenshots

 ![Normal view](https://global.discourse-cdn.com/meta/original/4X/2/b/6/2b678b73188d4c2349506bd8674274dd733ab77a.png)

### Sorting

 ![Sort Descending](https://global.discourse-cdn.com/meta/original/4X/0/5/2/052894dff5d2ecf8a5952b3e552e09558422125e.png)  
 ![Sort Ascending](https://global.discourse-cdn.com/meta/original/4X/e/1/6/e1618d6016cccdbcc52ea081e41c2e16c98a1779.png)

### Mobile view

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/9/1/491580bd6ea8ce14485a78e0f78ed064368d7cbb.jpeg)

> **With Category and Tags**
>
> ![image](https://global.discourse-cdn.com/meta/original/4X/c/e/4/ce4489e76ae2bf39a9ca1f13cb02f1c253e721bd.jpeg)

## Compatibility & Notes

With mobile, the sort functionality is already heavily limited, so created date would only function as an informational. The additional field only appears if the created date is different from the bumped date.

Compatibility with the [Topic List Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails/150602) is limited. In list style, it will function normally. In blog style, the created date is pulled to the bottom right. In grid style and masonry style, the created date is only visible when the “Created” filter is selected, and will replace the activity date. In minimal style, the created date is hidden.

---

<div class="post-metadata">

### Author: ![Monikas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/monikas/32/375316_2.png) [@Monikas](https://meta.discourse.org/u/Monikas)
#### Post date: [August 15, 2024, 10:20am UTC](https://meta.discourse.org/t/created-topic-sort/321521/2 "2024-08-15T10:20:32Z")

</div>

Wow, another perfect plugin that changes the forum! It would be great if it could integrate with the Discourse Nav Item Icon / Emoji plugin.

> [@Discourse Nav Item Icon / Emoji](https://meta.discourse.org/t/discourse-nav-item-icon-emoji/301105):
>
> information_sourceSummary Add Icon / Emoji before nav itemhammer_and_wrenchRepository [GitHub - VaperinaDEV/discourse-nav-item-icon-emoji: Add Icon / Emoji before nav item · GitHub](https://github.com/VaperinaDEV/discourse-nav-item-icon-emoji)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew 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 Hello wave With this theme component you can add icon or emoji before nav items. The theme component based o…

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/0/b/30bdd47917a476bc8931db1732c98a6ec4711a22.jpeg)

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/4/d/b4d068dd267d77432627222219317a7ccb467ccc.png)

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 15, 2024, 1:30pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/3 "2024-08-15T13:30:13Z")

</div>

I think it should work with it. :slight_smile:  
Just add it like for example:  
`emoji:created_date:twitter:spiral_calendar:filter`

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [August 15, 2024, 3:46pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/4 "2024-08-15T15:46:04Z")

</div>

Can confirm adding the setting as Don has it does work!

> [@Don](#):
>
> `emoji:created_date:twitter:spiral_calendar:filter`

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/f/e/efed817531ed6afd4c4ba577f8f32055cccc0dee.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/a/0/6/a0649f650807c1410e255b93a3e96aefe5e88d6a.png)

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [August 16, 2024, 8:57pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/5 "2024-08-16T20:57:36Z")

</div>

Very nice! Unfortunately it doesn’t play well with the Topic Thumbnails TC, adds an extra time for some reason:

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/c/e/ece9a924070b89732b32135face1f22a266c70aa.jpeg)

Note the extra 7h at the bottom of the center.

It appears I can just hide this `.topic-list .topic-list-data:last-of-type` but I thought I would let you know :grin:

EDIT: I found another oddity, when I click Latest, it highlights Created, and when I click Created it highlights latest :zany_face:

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [August 16, 2024, 9:29pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/6 "2024-08-16T21:29:47Z")

</div>

Huh. That’s interesting. Looks like it’s just an odd side effect of how the Topic Thumbnails and Created Topic Sort adding to the templates at the same time. Might just be an issue with masonry and grid mode? I’ll see if I can make a suitable adjustment for it in the CSS instead of just hiding it, once i figure out a clean way to detect the theme component usage.

The highlighting for latest and created sounds really weird. Created should only be highlighted when the url has `/latest?order=created` in it… hmmm…

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [August 17, 2024, 12:10am UTC](https://meta.discourse.org/t/created-topic-sort/321521/7 "2024-08-17T00:10:51Z")

</div>

I’ve updated some of the component to make it prettier for (or at least match) the Topic Thumbnails component.

[https://github.com/Alteras1/discourse-created-topic-sort/pull/4](https://github.com/Alteras1/discourse-created-topic-sort/pull/4)

In blog style, the created date is pulled to the bottom right. I couldn’t find a clean way to get it to be right next to the bump date, so this will have to do. In grid style and masonry style, the created date is only visible when the “Created” filter is selected, and will replace the activity date. I tried to get both activity date and created date to display at the same time, but it made the card feel cramped. In minimal style, the created date is hidden.

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [January 31, 2025, 4:55pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/8 "2025-01-31T16:55:27Z")

</div>

Would it be difficult to add a category scope to this? We would love to have it on our announcements section but don’t need it displayed in our general discussion, etc.

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [January 31, 2025, 10:58pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/9 "2025-01-31T22:58:10Z")

</div>

Not at all! I’ve just pushed out an update that adds four new settings to help control where the nav bar item and column gets displayed.

- **Enable nav bar item in home page** : Add the “Sort by Created Date” nav bar item in the home page.
- **Enable column in home page** : Add the “Created” column in the home page.
- **Categories to display nav bar item** : List of categories to display in the “Sort by Created Date” nav bar item. Leave empty to display in all categories.
- **Categories to display created column** : List of categories to display the “Created” column. Leave empty to display in all categories.

[https://github.com/Alteras1/discourse-created-topic-sort/pull/7](https://github.com/Alteras1/discourse-created-topic-sort/pull/7)

However, do note that the restrictions on displaying the column only works in sites using the new topic-list changes.

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [February 3, 2025, 2:07pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/10 "2025-02-03T14:07:51Z")

</div>

Thank you so much! :star_struck: This is awesome!

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [March 26, 2025, 11:44pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/11 "2025-03-26T23:44:49Z")

</div>

Any way to make this the default home page? I’ve seen some plugins add options to the “Top Menu” site setting so I’m thinking it’s possible.

Then I could effectively replace the standard Latest by hiding that one with CSS.

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [March 27, 2025, 3:29pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/12 "2025-03-27T15:29:27Z")

</div>

The default homepage can be set with a bit of JS:

```js
import { setDefaultHomepage } from "discourse/lib/utilities";
setDefaultHomepage("/latest?order=created");

```

Adding the option to the Top Menu settings is definitely preferable, but I don’t think there’s a way to do so from a TC, at least from what I last checked. I’ll have to see if something has changed in the interim.

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [March 27, 2025, 4:13pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/13 "2025-03-27T16:13:31Z")

</div>

> [@Alteras](#):
>
> `setDefaultHomepage("/latest?order=created");`

Thanks! That _should_ work but it appends `%3F_discourse_homepage_rewrite` to the url which interferes with the sorting. :confounded_face:

> <https://github.com/discourse/discourse/blob/ee1ad8e19ed201de1a7639a5ec9bdde324583ef7/app/assets/javascripts/discourse/app/lib/homepage-router-overrides.js#L31>

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [March 27, 2025, 4:38pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/14 "2025-03-27T16:38:28Z")

</div>

I was able to get around that by doing `setDefaultHomepage("latest?order=created&");`  
_But_ now the problem is, even though all the indicators say so, the actual sorting doesn’t apply.

So I tried the same url using [Custom Homepage for Groups](https://meta.discourse.org/t/custom-homepage-for-groups/199623) and that _did_ work :tada: Not sure why that component’s redirect would work differently since I’m pretty sure it using the same method.

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [March 27, 2025, 5:04pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/15 "2025-03-27T17:04:18Z")

</div>

figured it out, it needed to clear the PreloadStore

So one can edit your default theme or a new component to add this to the JS:

```plaintext
import { apiInitializer } from "discourse/lib/api";
import { setDefaultHomepage } from "discourse/lib/utilities";
import PreloadStore from "discourse/lib/preload-store";

export default apiInitializer((api) => {
  setDefaultHomepage("latest?order=created&");
  PreloadStore.remove("topic_list");
});

```

and this CSS to remove the Latest tab:

```plaintext
li.nav-item_latest {
    display: none;
}

```

Wish it could stay on the root homepage url, but that will probably take a plugin.

---

<div class="post-metadata">

### Author: ![dsims](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dsims/32/485916_2.png) [@dsims](https://meta.discourse.org/u/dsims)
#### Post date: [June 19, 2025, 3:56pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/16 "2025-06-19T15:56:12Z")

</div>

> [@dsims](#):
>
> Wish it could stay on the root homepage url, but that will probably take a plugin.

Ended up making that plugin: [Created as Default Sort Order](https://meta.discourse.org/t/created-as-default-sort-order/370920)  
So my home page is cleanly sorted by created. I still use this component to add the column.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 28, 2025, 10:12am UTC](https://meta.discourse.org/t/created-topic-sort/321521/18 "2025-10-28T10:12:13Z")

</div>

Thank you for this great theme component!

I’ve made a very small and simple [PR](https://github.com/Alteras1/discourse-created-topic-sort/pull/11) that allows to configure where the nav bar item appears.

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [October 28, 2025, 2:54pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/19 "2025-10-28T14:54:56Z")

</div>

Thank you for the PR! I’ve gone ahead and merged it and updated the settings description on the OP.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [May 2, 2026, 12:46am UTC](https://meta.discourse.org/t/created-topic-sort/321521/20 "2026-05-02T00:46:38Z")

</div>

Is it possible to have this work in a tag view? Currently when you view a tag the created menu option goes away. Thanks!

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [May 5, 2026, 11:53pm UTC](https://meta.discourse.org/t/created-topic-sort/321521/21 "2026-05-05T23:53:17Z")

</div>

Updated! Settings `tags_to_display_nav_bar_item` and `tags_to_display_created_column` have been added.

[https://github.com/Alteras1/discourse-created-topic-sort/commit/3eeec4ef68ae83d5789afd4bf501fc8329a9db22](https://github.com/Alteras1/discourse-created-topic-sort/commit/3eeec4ef68ae83d5789afd4bf501fc8329a9db22)

[Next page](https://meta.discourse.org/t/created-topic-sort/321521.md?page=2)
