How to split the forum into two main parts (general/groups) and how to display only subcategories I can create a new post in?

I’ve been a Discourse host for a year, and I only used what other people did like plugins and themes, and I think I’m ready to start building trying to build my own tools to fit my needs. But for my problem, I don’t really know how to start, if it would be more theme or plugin territory, nor which documentation I should read to achieve my goal, nor even if I should try to do that through CSS, javascript or something else (I’m not very sure of what each part of the code is responsible for).

I would be glad if you more advance users could point me some directions/clues.

Thanks in advance for your help.


I’m hosting some Discourse instances for some online communities and we would need to have two sorts of conversations:

  1. General conversations, with the whole community.
  2. Conversations with local or thematic subgroups I’m part of.

In order to differentiate these two audiences, I’d like them on two separate pages (/general and /subgroups or something similar). I would like those two pages to have different color/CSS so one can easily spot where they are. Switching from these two pages should be done with very big buttons which would look like the main options to choose from.

General conversations would of course be accessible for everyone, and subgroup conversations should be easily accessible if I’m part of the group or in a public-but-not-highlighted state if I’m not. Everything the group say is public, I can go see it, but I don’t want it to encumber my page because I mostly don’t care; I need to go to the category list and click the said category to access it.

Ideal setup

For example, the first page would offer Latest, Top, Unread and Categories layouts but would filter out all the subgroups categories. The second one would display the subgroup categories I’m in (with the last posts), and would also offer the Categories layout for all the existing subgroups so I can make the effort to see what is being said elsewhere. Ideally, there would also be a button to manage my adhesions to subgroups (a link to /g).

My best attempt so far

  • The main buttons switching from general and subgroups are done with the Custom Header Links plugin.

  • The general page is just Latest with the subgroup categories filtered out by the category setting remove this category from latest.

  • The subgroups categories are all subcategories of the same ‘#Subgroups’ category. For all of them, a paired group is set up (SubCat_n – Group_n). The security settings for the category is:

    • Group_n: Create/Answer/Read
    • All: Answer/Read

    The category is public but I don’t want users not in the group to be proposed to post in that category if they are not in the group.

  • The subgroup page is the category Subgroups page. The category setting show subcategory list is enabled so that prints the unmuted categories first with the most recent topics. Thus, a user not in Group_n needs to mute the category SubCat_n. That’s not that hard but long story short, they don’t know how to do it. Admins are then managing the muting settings for every user that wants to join or leave a category, and that’s a boring job.
    Moreover, that’s just a hack and the muting function is post-based so it does not work that much.

  • Thus, General mode corresponds to /latest, /unread… and Subgroups mode to /c/subgroups.

What I would love to achieve

  1. I would like a Category page that would display only subcategories for which I can Create (which means I’m in the correct group). [then I won’t need to manage the muting settings]
  2. I would also like to add a button pointing to /g looking like the Latest button showing up only when this Subgroup mode is selected. I know how to make the button but not how to use it so it only shows on this mode. I would also like to change the whole page CSS when I’m on this mode. Thus I would also be able to make the button General/Subgroups in the header to look selected when I’m on this mode.

Things for ongoing development if everything else works perfectly (which does not yet)

  • I’d like posts from a #Subgroup subcategory to show on the General (Latest filtered) page if and only if they have some special tag (like #annual-report or something).
  • I’d like /general to point to /latest or the default layout the user has chosen and /subgroups to the Subgroup category page.
  • I would prefer buttons for General/Subgroups something even more obvious and highlighted like the banner Theme/Colours/Content… in /admin/customize/themes.

Start small … work on something more simple first. You could consider contributing to an existing plugin you like the look of, but lacks a feature you would like it to have, submit a PR.

Your main goal is something that can motivate you to get more and more competent but don’t make the mistake of taking on something too big, getting stuck and giving up. Perhaps pick on one small feature of your final goal … and build that … then add another. Rome wasn’t built in a day!

There are a few guides on getting started people have written. Here’s my aggregation.