[memb_geoip]

Summary

The geoip shortcode detects and displays information about the visitor’s current location based on IP address.

Shortcode Examples

[memb_geoip]
[memb_geoip provider="geoip"]
[memb_geoip provider="hostip"]
[memb_geoip default="Unknown"]
[memb_geoip field="state"]
[memb_geoip field="country"]
[memb_geoip field="state" txtfmt="strtolower"]

Shortcode Parameters​

capture: A comma separated list of destinations to send the output of the shortcode to. (?)

default:  The value to display if the GeoIP detected value is empty.

field: The field you want to display.  Please see the description for possible values.

provider: The name of the GeoIP service to use, options are FreeGeoIP, GeoIP, and HostIP.

txtfrmt: A comma delimited list of text processing functions that will be applied on the output. (?)

The GeoIP shortcode detects information about the visitor’s current location based on their IP address.  This location data is based on various sources and is less accurate

Prior to v2.42.4

[memb_geoip] requires the the “GeoIP Detection” plugin available from the WordPress plugin repository. To install this plugin, you can search for “GeoIP Detect” in your plugin manager, or visit the site at https://wordpress.org/plugins/geoip-detect/. Once the plugin is installed, please go to the GeoIP Detect plugin page and click on update now, lookup and then save to activate the plugin.

Version 2.42.4 and later

As of version 2.42.4 and later, [memb_geoip] includes built in support for returning GeoIP data using various providers, however it supports GeoIP Detect.

FreeGeoIP Field Names

ip – The IP Address
country_code – Two Letter ISO Country Code.  Example:  US
country_name – The full name of the country.  Example:  United States
region_code – Two letter state / province / region code.  Example:  Ca
region_name – The full name of the state / province / region.  Example:  California
city – The name of the city.  Example:  Burbank
zip_code – The postal code.  Example:  91505
time_zone – The time zone code for the location.  Example:  America/Los_Angeles
latitude – The latitude of the location.  Example:  34.063
longitude – The longitude of the location.  Example:  -118.123
metro_code – The metro code of the location.  Example:  803

HostIP Field Names

country_name – The full name of the country.  Example:  UNITED STATES
country_code – Two Letter ISO Country Code.  Example:  US
city – The name of the city, with the region code.  Example:  Burbank, CA
ip – The IP Address
lat – The latitude of the location.  Example:  37.3164
lng – The longitude of the location.  Example:  -121.932

GeoIP Detect Field Names

area_code – The three digit telephone area code for this location.  Example:  760
city
 – The name of the city.  Example:  Burbank
continent_code
 – The two letter code for the continent the location is on.  Example:  NA
country_code – Two Letter ISO Country Code.  Example:  US
country_code3 – Three Letter ISO Country Code.  Example:  USA
country_name – United States
dma_code – 825
latitude – 0
longitude – 0
metro_code – 825
postal_code
 – 92056
region – CA
region_name – California
timezone – America/Los_Angeles

Shortcode Attributes

Conditional: No (?)
Nestable: No (?)
Accepts formatting: Yes (?)
Capturable: Yes (?)

9 ways to add more value to your membership site

[memb_geoip]

This Applies To