# Filtering Topics by Zip Codes

**URL:** <https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272>\
**Category:** Support\
**Created:** [January 20, 2016, 8:49pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272 "2016-01-20T20:49:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LanieI](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@LanieI](https://meta.discourse.org/u/LanieI)\
**Post date:** [January 20, 2016, 8:49pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/1 "2016-01-20T20:49:48Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)\
**Post date:** [January 21, 2016, 3:19pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/2 "2016-01-21T15:19:11Z")

</div>

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

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.

---

<div class="post-metadata">

**Author:** ![LanieI](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@LanieI](https://meta.discourse.org/u/LanieI)\
**Post date:** [January 21, 2016, 8:56pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/3 "2016-01-21T20:56:44Z")

</div>

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!  
Lanie

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [January 21, 2016, 9:44pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/4 "2016-01-21T21:44:34Z")

</div>

> [@LanieI](#):
>
> instead of using zip codes, filtering by cities?

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.

---

<div class="post-metadata">

**Author:** ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)\
**Post date:** [January 21, 2016, 10:24pm UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/5 "2016-01-21T22:24:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [January 22, 2016, 10:19am UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/6 "2016-01-22T10:19:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [December 11, 2018, 4:15am UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/7 "2018-12-11T04:15:22Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [October 21, 2021, 8:26am UTC](https://meta.discourse.org/t/filtering-topics-by-zip-codes/38272/8 "2021-10-21T08:26:17Z")

</div>


