[country_flag]

[country_flag]

This Geo Controller shortcode is intended to show the responsive SVG or HTML image flag from current visitors country.

Parameters

size – (accept: text) – The image size you need for the proper flag displaying. Example: 32px

type – (accept: integer 1 or 0, default: 0) – You can chose type of the image (This working only with the SVG images)

  • 1 – square
  • 0 – rectangle (standard)

country – (accept: country code) – If you need to display flag for the specific country, just place country code and you will get matched flag

id – ID  of the  HTML element

class – Classes of the HTML element

css – CSS for the HTML element

img– (no values) – This is single property with no values. If you place this property, shortcode return HTML <img> tag instead of SVG image.

exclude – (accept: comma separated text) – this parameter gives to shortcode new functionality. If you  add this parameter with continent, country, region, city name or code, it will hide flag from that setup locations. If location is not matched the flag will be shown.

include – (accept: comma separated text) – this parameter gives to shortcode new functionality. If you  add this parameter with continent, country, region, city name or code, it will show the flag from that setup locations. If location is not matched the flag will be hidden.

Return

Returns country flag like you see above.

Note: If you not see the flag above, check your PROXY or VPN connection.

Examples

For displaying flag with no property:

&lsqb;cfgeo_flag&rsqb;

Change flag size:



&lsqb;cfgeo_flag size=16px&rsqb;
&lsqb;cfgeo_flag size=24px&rsqb;
&lsqb;cfgeo_flag size=32px&rsqb;
&lsqb;cfgeo_flag size=64px&rsqb;

Show from the specific country:



&lsqb;cfgeo_flag size=24px country="us"&rsqb;
&lsqb;cfgeo_flag size=24px country="de"&rsqb;
&lsqb;cfgeo_flag size=24px country="gb"&rsqb;
&lsqb;cfgeo_flag size=24px country="rs"&rsqb;

The other possible options:

&lsqb;cfgeo_flag id="my-image"&rsqb;
&lsqb;cfgeo_flag id="my-image" class="img-round"&rsqb;
&lsqb;cfgeo_flag id="my-image" class="img-round img-responsive" css="margin-top:10px; display:block;" img&rsqb;
&lsqb;cfgeo_flag exclude="hu"&rsqb;
&lsqb;cfgeo_flag include="at"&rsqb;

Was this page helpful?