Visitor Country WordPress Plugin
This plugin adds support for displaying (using shortcodes) or enquiring (using PHP or JS) the visitor's country. See it working here.
It uses MaxMind's GeoIP data file, which is around 1.4 MB in size and is included with the plugin. The file is free, updated every month, and has the claimed accuracy of 99.5%;
GitHub Repository is here.
The plugin retrieves:
- The visitor's IP
- The visitor's country name
- The visitor's country code (2 letter ISO 3166)
The shortcodes are:
[VisitorCountry-IP][VisitorCountry-Code][VisitorCountry-Name]
The javascript variables are:
VisitorCountry.ipVisitorCountry.codeVisitorCountry.name
And the PHP functions:
global $VisitorCountry;
if ( isset($VisitorCountry) )
{
echo $VisitorCountry->GetIP();
echo $VisitorCountry->GetCode();
echo $VisitorCountry->GetName();
}
Please leave suggestions, comments and bug report at the plugin's website.
Also, please let it be known if the plugin works on versions older than 3.2 - I simply didn't have a way to check.
This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/app/geolitecountry
Sites running Visitor Country, click to open one
Plugins with a similar footprint
Ranked by how many sites run them — a quick way to compare alternatives.
Usage of Visitor Country over time
June 2023 — July 2024Between June 2023 and July 2024 the number of sites running this plugin went from 84 to 46 — down 38 (-45.2%).
| Month | Sites | Change |
|---|---|---|
| July 2024 | 46 | -8 |
| June 2024 | 54 | -4 |
| May 2024 | 58 | +0 |
| April 2024 | 58 | +0 |
| March 2024 | 58 | -1 |
| February 2024 | 59 | -3 |
| January 2024 | 62 | -3 |
| December 2023 | 65 | -1 |
| November 2023 | 66 | +0 |
| October 2023 | 66 | -3 |
| September 2023 | 69 | -9 |
| August 2023 | 78 | -3 |
| July 2023 | 81 | -3 |
| June 2023 | 84 | — |
Themes used with Visitor Country
Detected most often on sites that run this plugin.
| # | Theme |
|---|---|
| 1 | Divi |
| 2 | Twentytwelve |
| 3 | Genesis |
| 4 | Twentyten |
| 5 | Pr2013 |
| 6 | Emtelle |
| 7 | Glh |
| 8 | Enfold-child |
| 9 | Enfold |
| 10 | Terry-pratchett |
| 11 | Invest |
| 12 | Angusandjuliastone |
| 13 | Sportpress |
| 14 | Curated |
| 15 | Leonalewismusic |
| 16 | Lanadelrey |
| 17 | Bazar |
| 18 | Default |
| 19 | Maya |
| 20 | Glh2 |
Sites running Visitor Country
All sites in the collection46 examples from the collection. Open any site to see the theme and plugins we found on it.