Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

IP2Location Tags

Displays visitor’s geolocation information and customize the page content for different countries.

Allows you to easily get the visitor's geolocation information based on IP address and customize the page content for different countries and regions.

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
  • Customize the page content based on country or region
  • Supports IPv4 and IPv6

This plugin supports both IP2Location BIN data and web service for geolocation queries. 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 accurate result. Alternatively, you can also manually download and update the BIN data file using the below links:

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

If you are using the web service, please visit IP2Location 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}

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 http://www.ip2location.com

Author IP2Location
Profile
Contributors IP2Location
Tags customize content, geolocation, ip country, ip location, ip region, ip2location, IPv4, ipv6, iso3166, targeted content
  1. ip2location-tags screenshot 1

    IP2Location Tags setting page

  2. ip2location-tags screenshot 2

    IP2Location Tags shortcode display

  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.

  • 2.1.0 Initial release.
  • 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.3.0 Fixed crashed with other IP2Location plugins.
  • 2.3.1 Fixed minors issues and WordPress standards.
  • 2.3.2 Fixed compatibilities with widgets.
  • 2.3.3 Support the customization of the contents based on region/state.
  • 2.4.0 Fixed various performance issues. Added IP2Location Web service support.
  • 2.4.2 Fixed issue when matching region/state.
  • 2.4.3 Fixed issue when testing in local machine.
  • 2.4.4 Tested with WordPress 4.4.
  • 2.4.5 Use latest IP2Location library and updated the setting page.
  • 2.4.6 Fixed minor bug.
  • 2.4.7 Prevent settings lost when deactivate/activate the plugin.
  • 2.4.8 Fixed uninstall function.
  • 2.4.9 Support countryFlag feature.
  • 2.4.10 Fixed close sticky information panel issue.
  • 2.4.11 Use latest IP2Location library for lookup.
  • 2.5.0 Use IP2Location PHP 8.0.2 library for lookup.
  • 2.5.1 Fixed conflicts when multiple IP2Location plugins installed.
Share  
Download
Version 2.5.1

Requires WordPress version: 2.0 or higher

Compatible up to: 4.7.2

Last Updated 13 Feb 2017

Date Added: 16 Nov 2009

Plugin Homepage

Evaluation
star1
star2
star3
star4
star5

3.7 stars
3 ratings
4,764 downloads

Compatibility

Not Enough Data

Reports:
Works: 0
Broken: 0