People in California love If-So!
Your location name in the above example is displayed using theGeolocation DKI Shortcode. Your location is detected using our IP-to-location service.
Applying the geolocation shortcode is as simple as generating it with the generator below and pasting it on your site.
The shortcode below was used to create the demo at the top of this page. It includes all available attributes:
[ifsoDKI type="geo" show="country" ajax="yes" fallback="your country" before="users in" after="love If-So!"]
You can use the shortcode in any field that accepts shortcodes, or include it via a simple PHP line in your theme files.
Available shortcode attributes
yes
if your site uses caching. The location name will be loaded in a separate AJAX request after the cached content finishes loading.Use the shortcode generator below to generate your Geolocation DKI shortcode:
IP-to-location services (all providers, not just If-So) are not 100% accurate. Accuracy is generally high at the country and state levels, but it becomes more variable at the city level.
If you use the city-level Geolocation DKI shortcode, consider enabling our HTML5 Geolocation API or offering a manual self-selection option. The first approach improves accuracy, while the second lets users correct their location when needed.
The DKI shortcode retrieves values directly from our IP-to-location database and is limited to displaying location names in English. However, our CSV extension offers a solution:
1. Ensure the CSV extension is installed on your site.
2. Download our “All-countries” CSV file (click to download).
3. Insert the desired language’s location names in column D.
4. On your WP dashboard, create a new bulk with a geolocation condition and upload the file.
5. Paste the CSV shortcode, displaying values from column D, wherever you want to show the country name on your page.
We're sorry couldn’t be more helpful ☹️