Filtering Topics by Zip Codes

Does anyone have any ideas on how it would be possible to filter topics by zip codes? I was hoping to add a new user Field to the New Topic Box, or if that’s not possible, just add “Zip Code:” to the text box in the category editing. Then, next to the category edits, add the zip code filter. I have a lot of resources on how to do this on a site that I have access to all of the code, but since I’m hosting through Discourse, I’m not sure if how to do it.
Thanks a lot!

There are approximately 43,000 ZIP (postal) Codes in the United States. That’s an awful lot of tags. :frowning:

Do you really have enough content to justify splitting it into unique postal codes? Heck, even my post office serves several zip codes for efficiency purposes…

Also keep in mind that user fields are associated with users, not with topics.


Hi @downey ,

What about using tags for topics, and maybe instead of using zip codes, filtering by cities? We just started testing, but we are geared to have users all over the country and posts are meant for people in the same area.

Thanks a lot!

1 Like

I think there will be even more of those than there are ZIP codes, but maybe not. Anyway, it would still be a lot.

ZIP codes start with “state” eg. all Massachusetts ZIP codes begin with “01”
50 tags might still be a lot, but I think it would be more sane if it meets your needs.

Nested categories for States -> Cities could work. You could hold off on creating sub categories for cities until you have enough content and start them all at the state level so people could still interact with similar audiences. Then move relevant topics to that new city subcategory once the demand is there.


And for some areas, like the Northeast US, even states is too small of a split sometimes. Again, start out broad, split when it becomes obvious you need to.