Title: IP2Location Tags
Author: IP2Location
Published: <strong>November 16, 2009</strong>
Last modified: December 3, 2025

---

Search plugins

![](https://ps.w.org/ip2location-tags/assets/banner-772x250.png?rev=1034292)

![](https://ps.w.org/ip2location-tags/assets/icon-128x128.png?rev=2121921)

# IP2Location Tags

 By [IP2Location](https://profiles.wordpress.org/ip2location/)

[Download](https://downloads.wordpress.org/plugin/ip2location-tags.2.13.7.zip)

 * [Details](https://test.wordpress.org/plugins/ip2location-tags/#description)
 * [Reviews](https://test.wordpress.org/plugins/ip2location-tags/#reviews)
 *  [Installation](https://test.wordpress.org/plugins/ip2location-tags/#installation)
 * [Development](https://test.wordpress.org/plugins/ip2location-tags/#developers)

 [Support](https://wordpress.org/support/plugin/ip2location-tags/)

## Description

IP2Location Tags helps you to serve specific content to website visitors based on
geographic location for different countries and regions via IP address lookup.

This plugin provides a relatively easy way to detect visitors’ IP addresses and 
translate it into geolocation information, and then keep visitors better engaged
with localized information or content that’s most relevant to them.

Key Features

 * Displays visitor’s’ information such as
    - Country code
    - Country name
    - Country flag
    - Region name
    - City name
    - Latitude and longitude
    - ZIP code
    - ISP
    - Domain name
    - Time zone
    - Net speed
    - IDD code
    - Area code
    - Weather station code & name
    - MNC, MCC, mobile carrier name
    - Elevation
    - Usage type
    - Address type
    - Category
 * Customize the page content based on country or region
 * Supports IPv4 and IPv6

This plugin supports both IP2Location IP geolocation BIN data and web service for
IP geolocation lookup. If you are using the BIN data, you can update the BIN data
every month by using the wizard on the settings page for the most accurate result.
Alternatively, you can also manually download and update the BIN data file using
the below links:

BIN file download: [IP2Location Commercial database](http://ip2location.com) | [IP2Location LITE database (free edition)](http://lite.ip2location.com)

If you are using the IP2Location IP geolocation web service, please visit [IP2Location Web Service](http://www.ip2location.com/web-service)
for details.

#### Get visitor’s location information with Variable Tag

_Usage example_

Display visitor’s IP address, country name, region name and city name.
 _Your IP
is {ip:ipAddress}_ _You are in {ip:countryName}, {ip:regionName}, {ip:cityName}_

#### Geo-targeting: Customize the post content with IP2Location Tag

**Syntax to show content for specific country**
 _[ip:XX[,XX]..[,XX]]Your content
here.[/ip]_ Note: XX is a two-character ISO-3166 country code.

_Example_
 To show the content for United States or Canada visitors only. _[ip:US,
CA]Only visitors from United States or Canada can view this line.[/ip]_

**Syntax to show content for specific country and region**
 _[ip:XX:YY[,XX:YY]..[,
XX:YY]]Your content here.[/ip]_ Note: XX is a two-character ISO-3166 country code
and YY is a ISO-3166-2 sub-division code.

_Example_
 _To show the content for California or New York visitors only._ _[ip:
US:CA,US:NY]Only visitors from California or New York can view this line.[/ip]_

**Syntax to hide the content from specific country**
 _[ip:*,-XX[,-XX]..[,-XX]]Your
content here.[/ip]_ Note: XX is a two-character ISO-3166 country code.

_Example_
 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]_

**Syntax to hide the content from specific country and region**
 _[ip:*,-XX:YY[,-
XX:YY]..[,-XX:YY]]Your content here.[/ip]_ Note: XX is a two-character ISO-3166 
country code and YY is a ISO-3166-2 sub-division code.

_Example_
 All visitors will be able to see the line except visitors from California._[
ip:*,-US:CA]All visitors will be able to see this line except visitors from California.[/
ip]_

#### More Information

Please visit us at [https://www.ip2location.com](https://www.ip2location.com)

## Screenshots

 * [[
 * IP2Location Tags setting page
 * [[
 * IP2Location Tags shortcode display

## Installation

 1. Upload `ip2location` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Download the latest BIN database at settings page.
 4. You can now start using IP2Location tag to customize your post content.

Please take note that this plugin requires minimum **PHP version 5.4**.

## Reviews

![](https://secure.gravatar.com/avatar/3a29981ec26713acf3c9e1fb4c00078a755a652a85684547eee3cd0c783f5f1a?
s=60&d=retro&r=g)

### 󠀁[Just what I needed!](https://wordpress.org/support/topic/just-what-i-needed-1366/)󠁿

 [deancarlton](https://profiles.wordpress.org/deancarlton/) March 10, 2025

I needed to show content for certain countries only – and show everyone else alternative
content without indicating I was Geo Blocking – did the job easily in a few minutes!

![](https://secure.gravatar.com/avatar/ac98ca1dafe795b7d627ee9b76d51e6456e06f93361e17b5d7870b8baf8a36ce?
s=60&d=retro&r=g)

### 󠀁[Rolls its own shortcode system](https://wordpress.org/support/topic/rolls-its-own-shortcode-system/)󠁿

 [motivmedia](https://profiles.wordpress.org/motivmedia/) June 15, 2023

I was wondering why I couldn’t get it to work within CF7 forms (yes, I know how 
to allow third-party shortcodes in CF7). Out of curiosity I looked at source code
as the shortcode syntax looked unusual. Thing is, I searched over the whole plugin
dir for add_shortcode and there wasn’t a single match… looking closer, for some 
reason the developer decided it to be a good idea to roll their own shortcode system
which just won’t work at the same places as regular shortcodes. Regular shortcodes
would have been the perfect solution to make this work reliably, but somehow that
was off the table. And just to be clear: This is an issue purely of this plugin.
Its sister plugin IP2Location Country Blocker works great, which speaks for the 
provider’s database.

![](https://secure.gravatar.com/avatar/ceb59a18f6803a4c9921aeea99399959d054cea320ba9670f3b9f97136bd1ba7?
s=60&d=retro&r=g)

### 󠀁[The best Geo content plugin](https://wordpress.org/support/topic/the-best-geo-content-plugin/)󠁿

 [laurawen912](https://profiles.wordpress.org/laurawen912/) January 1, 2021

i really love this plugin

![](https://secure.gravatar.com/avatar/ddc4f92fe9b296cde5f94d0200fe94307bc22c9d21ce65e920089172996ea2ea?
s=60&d=retro&r=g)

### 󠀁[Not Working](https://wordpress.org/support/topic/not-working-3338/)󠁿

 [juliocofre](https://profiles.wordpress.org/juliocofre/) July 30, 2020 1 reply

this plugin doesn’t work, even if you update the database, it still doesn’t work

![](https://secure.gravatar.com/avatar/5be374f96332836be4b3d830df3f7e25a31c42a5474b47b61749de4e8f6d8a76?
s=60&d=retro&r=g)

### 󠀁[Just what i needed !](https://wordpress.org/support/topic/just-what-i-needed-988/)󠁿

 [0builder](https://profiles.wordpress.org/0builder/) June 27, 2020

Works as expected 🙂

![](https://secure.gravatar.com/avatar/4834db2b3fc38e4838a592d4fdd36ac4677742c0f15298bff9b6900bfda3dec0?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-3967/)󠁿

 [fafani](https://profiles.wordpress.org/fafani/) April 18, 2017

Plugin works with wordpress 4.7.3 Thanks you saved my time

 [ Read all 9 reviews ](https://wordpress.org/support/plugin/ip2location-tags/reviews/)

## Contributors & Developers

“IP2Location Tags” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ IP2Location ](https://profiles.wordpress.org/ip2location/)

[Translate “IP2Location Tags” into your language.](https://translate.wordpress.org/projects/wp-plugins/ip2location-tags)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/ip2location-tags/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ip2location-tags/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ip2location-tags/)
by [RSS](https://plugins.trac.wordpress.org/log/ip2location-tags/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

 * 2.13.7 Tested up to WordPress 6.9.
 * 2.13.6 Security fixes.
 * 2.13.5 Tested up to WordPress 6.8.
 * 2.13.4 Fixed web service validation error when insert both IP2Location and IP2Location.
   io keys.
 * 2.13.3 Tested up to WordPress 6.7.
 * 2.13.1 Tested up to WordPress 6.5.1.
 * 2.13.0 Added ip2location.io web service support.
 * 2.12.7 Tested up to WordPress 6.4
 * 2.12.4 Tested up to WordPress 6.1.
 * 2.12.3 Tested up to WordPress 6.0.
 * 2.12.2 Fixed missing country flags.
 * 2.12.1 Enhanced checking.
 * 2.12.0 Updated IP2Location library.
 * 2.11.1 Tested up to WordPress 5.9.
 * 2.11.0 Added new address type and category fields.
 * 2.10.7 Fixed pop up not closing.
 * 2.10.6 Tested up to WordPress 5.8.
 * 2.10.5 Fixed lookup issues with Web service.
 * 2.10.4 Tested up to WordPress 5.7.
 * 2.10.3 Fixed file permission issues for some users.
 * 2.10.2 Fixed error reading database file.
 * 2.10.1 Removed built-in database.
 * 2.10.0 Added setup wizard.
 * 2.9.3 Fixed error when results are not available.
 * 2.9.2 Tested up to WordPress 5.6.
 * 2.9.1 Removed deprecated functions.
 * 2.9.0 Updated file structures to use composer for IP2Location libraries.
 * 2.8.10 Tested with WordPress 5.5.
 * 2.8.9 Fixed deprecation warning.
 * 2.8.8 Tested with WordPress 5.4.
 * 2.8.7 Fixed typo.
 * 2.8.6 Minor fixes.
 * 2.8.5 Added feedback request.
 * 2.8.4 Tested with WordPress 5.3.2.
 * 2.8.3 Updated IP2Location library to 8.1.0.
 * 2.8.2 Updated documentation links.
 * 2.8.1 Tested up to WordPress 5.1.1.
 * 2.8.0 Upgraded IP2Location API to v2.
 * 2.7.1 Added error message when IP2Location database is missing or corrupted.
 * 2.7.0 Added debug log.
 * 2.6.1 Minor changes.
 * 2.6.0 IP2Location database update changed to use download token.
 * 2.5.1 Fixed conflicts when multiple IP2Location plugins installed.
 * 2.5.0 Use IP2Location PHP 8.0.2 library for lookup.
 * 2.4.9 Support countryFlag feature.
 * 2.4.8 Fixed uninstall function.
 * 2.4.7 Prevent settings lost when deactivate/activate the plugin.
 * 2.4.6 Fixed minor bug.
 * 2.4.5 Use latest IP2Location library and updated the setting page.
 * 2.4.4 Tested with WordPress 4.4.
 * 2.4.3 Fixed issue when testing in local machine.
 * 2.4.2 Fixed issue when matching region/state.
 * 2.4.11 Use latest IP2Location library for lookup.
 * 2.4.10 Fixed close sticky information panel issue.
 * 2.4.0 Fixed various performance issues. Added IP2Location Web service support.
 * 2.3.3 Support the customization of the contents based on region/state.
 * 2.3.2 Fixed compatibilities with widgets.
 * 2.3.1 Fixed minors issues and WordPress standards.
 * 2.3.0 Fixed crashed with other IP2Location plugins.
 * 2.2.0 Support database downloading on settings page. Support bracket [] to define
   the tag rule in addition to <&lgt;, to solve of issue of being treated as script
   tag by wordpress.
 * 2.1.0 Initial release.

## Meta

 *  Version **2.13.7**
 *  Last updated **4 months ago**
 *  Active installations **200+**
 *  WordPress version ** 2.0 or higher **
 *  Tested up to **6.9.4**
 *  Language
 * [English (US)](https://wordpress.org/plugins/ip2location-tags/)
 * Tags
 * [geo-targeting](https://test.wordpress.org/plugins/tags/geo-targeting/)[geolocation](https://test.wordpress.org/plugins/tags/geolocation/)
   [ip2location](https://test.wordpress.org/plugins/tags/ip2location/)
 *  [Advanced View](https://test.wordpress.org/plugins/ip2location-tags/advanced/)

## Ratings

 3.7 out of 5 stars.

 *  [  6 5-star reviews     ](https://wordpress.org/support/plugin/ip2location-tags/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/ip2location-tags/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/ip2location-tags/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/ip2location-tags/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/ip2location-tags/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/ip2location-tags/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ip2location-tags/reviews/)

## Contributors

 *   [ IP2Location ](https://profiles.wordpress.org/ip2location/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/ip2location-tags/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://www.ip2location.com)