Show content to users based on IP-based country

I want to develop a website which shows specific site content to users based on their geo location. For example, if the users select “Singapore” from the list of locations on home page, then all pages in the website should change to content created for Singapore. Please help me how to do this and also pls give the codes. thank you

Hi,

One way to implement this is to save the user’s preference in their local storage using the Wix Storage Frontend API.

Based on the user’s country selection, you can use this data to conditionally display relevant content across all pages on your site. You can also back this up in a CMS Collection associated to logged in members to track preferences across different web browsers and devices.

You should also check out this code example showing how to tailor content to a user’s location: