Add or replace any content on your site based on the visitor’s physical location: continent, country, state, city, or timezone.
How does the WordPress location-based content work
If-So makes it easy to display location-based content by letting you add or replace any element on your pages according to the visitor’s location. You can dynamically change text, titles, menu items, images, videos, buttons, or any other on-page content.
The location-based content works seamlessly with every WordPress page builder.
How do we detect the user’s location?
Location detection is handled through a premium, highly accurate IP-to-location database. When higher precision is needed, the browser’s HTML5 Geolocation API can be used instead or in adittion, allowing address-level accuracy when the visitor grants permission.
No coding or technical setup is required. Simply install the plugin, select the target locations, and define the content to display.
Use cases
Create promotions in specific countries
Highlight different products in chosen locations
Direct visitors to the closest branch
Show location-based messages to visitors from certain locations
If-So gives you a fast, accurate, and reliable way to deliver location-based content in WordPress without technical overhead. Here’s why it’s the ideal solution:
No coding or technical skills required
Works with all caching plugins
Powered by a highly accurate premium IP database
HTML5 Geolocation API (in addition to IP-to-location)
Location stored in cache per session, avoiding repeated checks and improving performance
Works alongside other geolocation features: Dynamic Keyword Insertion, Manual Location Override, Geo Redirects, geo pop-ups, and more
Step-by-step: How to set up location-based content?
The setup involves two steps: (1) creating a trigger with a geolocation condition, and (2) adding a redirect shortcode that sends matching visitors to the target URL.
On your WordPress dashboard, go to If-So → Add New Trigger. Screenshot
In version A, select the geolocation condition and choose the locations you want to target. Screenshot
In the version A content field, enter the content that will be displayed when the visitor’s location matches your targeting. Screenshot
In the default content field, enter the content to display when the visitor’s location does not match any of your targeted locations. Leave this field empty if you prefer not to show anything in these cases. Screenshot
Click Publish and paste the shortcode generated by If-So anywhere on your website where you want the content to appear. Screenshot
In the Elementor editor, select the element you want to use as location-based content.
In the element settings panel, go to the If-So tab.
Choose the Geolocation condition, and select the location type (country, state, city, etc.), then pick the specific locations you want to target. Screenshot
Click Update to save the page.
Test your location-based content using a VPN to simulate different locations.
In the Gutenberg editor, select the block you want to use as location-based content.
In the block settings sidebar, open the If-So Conditions panel.
Choose the Geolocation condition and select the location type (country, state, city, etc.), then choose the specific locations you want to target. Screenshot
Update or publish the page to save your changes.
Test your location-based content using a VPN to simulate different locations.
Monthly Session Limit
Geolocation usage is limited by the number of monthly sessions (it’s the only If-So condition that is limited). The beginning of a session is defined as when a visitor first visits a page with a geolocation trigger. The end of a session is when either a visitor closes the browser, or there have been more than 25 minutes of inactivity (it may vary slightly between browsers).