[memb_geoip]

Description

Performs a geolocation lookup on the visitor's real IP address (or a specified one) and returns the requested field. Output is HTML-escaped and passes through the standard output formatting attributes.

Requires a valid license; renders nothing when unlicensed or when the request is an RSS feed.

Field aliases are accepted for convenience: country → country_name, province/region/state → region_name, region_code → region.

Shortcode Examples

Welcome visitors from [memb_geoip field="country"]!

Custom provider and IP override:

[memb_geoip field="city" ip_address="8.8.8.8" provider="maxmind" default="Unknown City"]

Shortcode Parameters

field

Geolocation field to return. Common values: country_name, country_code, region_name, region, city, postal_code, latitude, longitude, timezone. Aliases: country, province, state, region_code. Default: 'country_name'.

ip_address

IP address to look up instead of the visitor's real IP. Default: '' (visitor's IP).

provider

Geolocation provider override (e.g. a provider slug). Default: '' (site default).

default

Fallback value when the field is empty. Default: ''.

before

Content prepended to the output. Default: ''.

after

Content appended to the output. Default: ''.

txtfmt

Text format applied to the output.

capture

Output capture mode.

htmlattr

HTML attribute wrapper for the output.

Shortcode Attributes

Attribute Value
Conditional No
Nestable No
Accepts formatting Yes