Get website visitor's location based on IP address and show/hide specific content depending on country.
As of April 2026, Geolocator is a WordPress geolocator plugin with 50 active installations and a 4/5 rating from 4 reviews. It has been downloaded 4.0K+ times in total. Requires WordPress 4.1.1+ and PHP false+. Available on WordPress.org since 2015. Last updated 8 years ago — may have compatibility concerns.
Get website visitor’s location based on IP address and show/hide specific content depending on country.
You can hide post for particular country by filling “Hide for” field in custom meta box in post’s edit screen. That way the post will not be included to the loop and other parts of the website.
Country
The most basic shortcode of the plugin is [geolocator] which displays country of the visitor.
Show
You can show some specific content for particular country by using [geolocator_show] shortcode. See example below.
[geolocator_show for="US"]This information is being shown to visitors from United States only.[/geolocator_show]
The shortcode accepts “for” attribute. It should be a 2-letter ISO code of the country you want to show the c…
| WordPress | 4.1.1+ requiredTested up to 4.9.29 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.