• Home
  • Display the visitor’s country flag

How to display the visitor's country flag

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

  1. Install the If-So CSV extension (if you haven’t already).
  2. Download the CSV country flag file (right-click here and choose “save link as…”).
  3. On your WordPress dashboard, go to If-So > Bulks.
  4. Name your Bulk (the name is for your reference only; you can name it “Country flags”, for example).
  5. Under “Condition Type”, select “Geolocation”.
  6. Under “Geolocation Type”, select “Country”.
  7. CSV separator – leave it as-is (“Comma”).
  8. Upload the file.
  9. Click “Create Bulk”.
Country flags

Displaying the flag on your page

  1. The Bulk you created in the previous step should now appear on the If-So > Bulks page. Find it and click “View”.
  2. Copy the shortcode of the columns with the flags.
  3. Paste the shortcode anywhere on your website.
  • Was this Helpful ?
  • YesNo
Ready to get started?
Try it on your website