Different category and sub-category order behaviour

AI-generated summary

In a discussion titled “Different category and sub-category order behaviour,” Tom_Newhouse asks if it’s possible to sort sub-categories (e.g., in “Rolling stock products”) by latest activity while preserving the main category order — particularly since their site uses /categories as the homepage and may have hundreds of sub-categories. He includes a screenshot illustrating the layout. Falco initially cautions against using so many categories, linking to a meta post on recommended limits. Tom_Newhouse clarifies that their usage is within Sam’s stated limits and reiterates the request for a solution. Falco replies that achieving this behavior requires a custom theme-component, and links to the Developer’s guide to Discourse Themes. No out-of-the-box solution is offered, but the path forward is pointed to theme development.

I’m currently trying to figure out if there is any way to have categories and sub-categories behave differently in terms of sort order.

We’re using /categories as our home page and due to the nature of our products, certain categories are likely to have hundreds of sub-categories.

I’ve managed to limit the number of sub-categories shown on the main category page using CSS but I’d like for these sub-categories in the “Rolling stock products” category (say Top 5 or 10) to be ordered by latest activity whilst keeping the higher level category order intact.

Is this possible?

Thanks in advance for any help.

We don’t recommend using that number of categories.

It’s well within the limits that Sam mentioned in his post.

Is there an actual solution to the question at hand though?

You will need a custom theme-component to get that behavior.

Developer’s guide to Discourse Themes