• 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 it using our Dynamic Content from CSV extension. We created a CSV file with all the country’s flags, so all you need to do is to 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 WP 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 as it 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 be shown 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