Add more groups to "About Us" page

I have a discourse forum, and I noticed that there is only 2 groups; admin and moderator. Can I add more groups and make them listed on the About us page?

Our Admins 
Our Moderators
Our Trainees
Our Interns
Etc. Etc.
3 Likes

There isn’t a setting you can change to do this, but it’s possible in a theme.

Add this to admin > customize > themes > edit CSS/HTML > common > head

<script type="text/discourse-plugin" version="0.8">
const ajax = require('discourse/lib/ajax').ajax;

  api.registerConnectorClass('about-after-moderators', 'custom-group', { 
    setupComponent(args, component) {

        var groups = ["trainees", "interns"]; // Add group names here
        
        groups.forEach(function(group) {
            ajax("/groups/" + group + "/members.json").then (function(result){ 
              var groupMembers = [];
              result.members.forEach(function(members){
                groupMembers.push(members);
              });
              component.set(group, groupMembers); 
            });
        });
    }
    });
    
</script>


<script type="text/x-handlebars" data-template-name="/connectors/about-after-moderators/custom-group"> 

<!-- Duplicate me -->
<section class='about custom'> 
   <h3>{{d-icon "users"}} Our Trainees</h3> <!-- Change icon and title -->
   <div class='users'>
     {{#each trainees as |u|}} <!-- change group name here  -->
       {{user-info user=u}}
     {{/each}}
    </div>
</section>
<!-- duplicate end -->

<section class='about custom'> 
   <h3>{{d-icon "users"}} Our Interns</h3> <!-- Change icon and title -->
   <div class='users'>
     {{#each interns as |u|}} <!-- change group name here  -->
       {{user-info user=u}}    
     {{/each}}
    </div>
</section>

<!-- Add more groups here -->

</script>

If you want to add more groups:

  1. Add the name where it says // Add group names here and then duplicate one of the sections
  2. Duplicate the section surrounded by <!-- Duplicate me -->
  3. Change the group name and title in the section you just duplicated (where noted)
9 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.