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.
How to import and use 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”.