Streaming live at 10am (PST)

Show / Hide Div Block Content based on Country Ip Address

I have the following div blocks

  1. usa-content
  2. canada-content
  3. uk-content
  4. mexico-content
  5. spain-content
  6. outside-content

I’m looking for a solution that SHOW/HIDE div block based on country ip address.
This is for displaying compliant disclaimers per country and then I’ll put a little flag IX2 toggle to switch country manually, but it needs to default on the version SHOW/HIDE based on IP country of origin.

Hi miekwave - did you manage to resolve this query? I would love to know how to solve it too!

You can use any geolocation API, there are some with free subscription. Find one that will give you all you need and then use a bit of javascript to write condition logic.

1 Like