Your Country Flag
Conditions/features in use: The Geolocation Condition & The CSV Extension
Display any country-related content using a CSV file
The country’s flag on this page is displayed using our CSV extension. The extension is built to create and manage thousands of different versions with ease, and with minimal effect on the loading speed.
The CSV file in this example consists of a list of all 249 countries, their names, and their flags. The file is available for you to download and use on your site.
How to display the user’s country flag on your site
If you’d like to display the visitor’s country flag, you can easily do so using our dynamic content from CSV extension. We already created a CSV file with all the countries’ flags, so all you need to do is import it to your site and display the flag using a shortcode anywhere on your site.
Import the countries’ flags CSV on your site
- Install the If-So CSV extension (if you haven’t already).
- Download the CSV country flag file (right-click here and choose “save link as…”).
- On your WordPress dashboard, go to If-So > Bulks.
- Name your Bulk (the name is for your reference only; you can name it “Country flags”, for example).
- Under “Condition Type”, select “Geolocation”.
- Under “Geolocation Type”, select “Country”.
- CSV separator – leave it as-is (“Comma”).
- Upload the file.
- Click “Create Bulk”.

Displaying the flag on your page
- The Bulk you created in the previous step should now appear on the If-So > Bulks page. Find it and click “View”.
- Copy the shortcode of the columns with the flags.
- Paste the shortcode anywhere on your website.