How to use Geo Flags
Geo Flags it's a simple shortcode that will let you show to your users their country flag depending on where they are located. Not only that, you can also use the plugin to show any other flag that you need.
This it's an addon of GeotargetingWP, which means that you have to install that plugin first in order to make it work
How to display flags based on user location?
To do that simple use the shortcode like the one below which will print current user country flag with a 100px size.
[geo-flag squared="false" size="100px"]
If you need square flags simple change the squared attribute to true
How to display flag for any country?
You can pass any 2 letter iso code to print a desired flag by doing the following:
How to change html structure?
The plugin uses great flags library by Lipin which uses span tags for redering the flags. In case you need to change it you can pass it like this:
[geo-flag country_code="US" html_tag="div"]