Show content based on the zip code site visitor provides

[ad_1]

I’m working with a client on their WordPress site. They have a small manufacturing company, and they have different sales territory based on zip code. Each sales rep covers about 3,500 US zip codes. They want to enable website visitors to type in their zip code, and have a page show the contact information for the sales rep responsible for the region with that zip code.

I have an Excel spreadsheet with 40K+ zip codes, each associated to a sales rep. (don’t ask me who typed all that in). The WordPress site is NOT on [Wordpress.com]), if that helps. We have SearchWP and the paid version of ACF, if that helps.

I’m struggling to get my mind around an approach to this. Seems like something someone has probably solved before, I just don’t know where to start on this. Any tips or pointers would be greatly appreciated. Thanks!

[ad_2]
3 Comments
  1. 1: You need a way to turn your spreadsheet into an API. I use NoCodeAPI.com for google sheets, but I dont know about Excel sheets. Im sure there is a service for it.

    2: you make a form that, when submitted, makes a request to the API with the entered zip code, which then returns the corresponding sales rep

    3: you redirect to the that sales rep’s page (you can use if statements or even better include their URLs in the spreadsheet and get it directly)

  2. I’ve done a similar thing using Formidable Pro’s lookup fields. You can upload the data to a “data” form and then based on the zip on the front end form display the sales.

    Of course this is a no code way. You can do this in many ways with an actual DB call.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer