How to add a directory of people/businesses to my theme?

Maybe think of it in terms of what aspect of Discourse (technically, what model in the Discourse database) comes closest to representing the key elements of a business.

None of these seem to fit:

  • post
  • topic
  • tag
  • category

I think a ‘group’ is a good match for a business. Discourse groups have fields for:

  • name
  • description
  • owners
  • members
  • an (optional) badge that can be used to distinguish group members
  • an (optional) email domain that can be used to automatically add users to the group
  • an (optional) incoming email address that can be used to message the group on the forum via email
  • permissions (that can be used to manage category permissions, etc)

Those fields seem to map to the aspects of a business that you might want to represent on a forum. Discourse also has a “groups directory” and individual group pages. I suspect that the groups directory could become your business directory with little to no custom work.

Obviously, this all depends on your specific use case. If businesses are not a key part of your forum, you might want to take a different approach.