ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

IP2Location Tag Wordpress Plugin

IP2Location Tag provides a solution to easily get the visitor's location information based on IP address and customize the content display for different countries. This plugin uses IP2Location BIN file for location queries, therefore there is no need to set up any relational database to use it. Depending on the BIN file that you are using, this plugin is able to provide you the information of country, region or state, city, latitude and longitude, US ZIP code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation and usage type of origin for an IP address.

BIN file download: IP2Location Commercial database | IP2Location LITE database (free edition).

Download IP2Location Tag Wordpress Plugin

Get visitor's location information with Variable Tag

Variable TagDescription
{ip:ipAddress}IP address.
{ip:countryCode}Two-character country code based on ISO 3166.
{ip:countryName}Country name based on ISO 3166.
{ip:regionName}Region or state name.
{ip:cityName}City name.
{ip:latitude}City latitude. Default to capital city latitude if city is unknown.
{ip:longitude}City longitude. Default to capital city longitude if city is unknown.
{ip:zipCode}ZIP/Postal code.
{ip:isp}Internet Service Provider or company's name.
{ip:domainName}Internet domain name associated to IP address range.
{ip:timeZone}UTC time zone.
{ip:netSpeed}Internet connection type.
DIAL = dial up, DSL = broadband/cable/fiber, COMP = company/T1
{ip:iddCode}The IDD prefix to call the city from another country.
{ip:areaCode}A varying length number assigned to geographic areas for call between cities.
{ip:weatherStationCode}The special code to identify the nearest weather observation station.
{ip:weatherStationName}The name of the nearest weather observation station.
{ip:mcc}Mobile Country Codes (MCC) as defined in ITU E.212 for use in identifying mobile stations in wireless telephone networks, particularly GSM and UMTS networks.
{ip:mnc}Mobile Network Code (MNC) is used in combination with a Mobile Country Code (MCC) to uniquely identify a mobile phone operator or carrier.
{ip:mobileCarrierName}Commercial brand associated with the mobile carrier.
{ip:elevation}Average height of city above sea level in meters (m).
{ip:usageType} Usage type classification of ISP or company
(COM) Commercial
(ORG) Organization
(GOV) Government
(MIL) Military
(EDU) University/College/School
(LIB) Library
(CDN) Content Delivery Network
(ISP) Fixed Line ISP
(MOB) Mobile ISP
(DCH) Data Center/Web Hosting/Transit
(SES) Search Engine Spider
(RSV) Reserved

Usage Example

Display visitor's IP address, country name, region name and city name.
Your IP is {ip:ipAddress}
You are came from {ip:countryName}, {ip:regionName}, {ip:cityName}

Customize the post content with IP2Location Tag

Syntax to show content for specific country

<ip:XX[,XX]..[,XX]>You content here.</ip>
Note: XX is a two-digit ISO-3166 country code.


To show the content for United States and Canada visitors only.
<ip:US,CA>Only visitors from United States and Canada can view this line.</ip>

Syntax to hide the content from specific country

<ip:*,-XX[,-XX]..[,-XX]>You content here.</ip>
Note: XX is a two-digit ISO-3166 country code.


All visitors will be able to see the line except visitors from Vietnam.
<ip:*,-VN>All visitors will be able to see this line except visitors from Vietnam.</ip>