Plugin Directory

Custom Content by Country (by iControlWP)

Tool for displaying/hiding custom content based on visitors country/location.


  • Add option to remove the ip2nations data from the database.


released 2nd, June 2016

  • UPDATED: Updated Geo location database to latest available version: 2016-05-25.


released 10th, August 2015

  • UPDATED: Support WordPress v4.4


released 10th, August 2015

  • FIXED: PHP Warning notice in settings page.


released 26th, July 2015

  • UPDATED: Updated Geo location database to latest available version: 2015-07-25.


released 15th, June 2015

  • UPDATED: Updated Geo location database to latest available version: 2015-06-13.


released 16th, April 2015

  • UPDATED: Updated Geo location database to latest available version: 2015-02-18.
  • FIX: ISO Country Codes for Mexico (MX), and Maldives (MV)


  • CHANGED: WordPress 4.0 compatibility.
  • CHANGED: Changed plugin version to be shorter (YYMMDD)


  • FIXED: Manually updated the database data to correctly store ISO Codes for Countries. ref


  • FIXED: Manual tweak to the ip2nations database to correctly reflect the ISO country code for Sweden ref
  • CHANGED: Plugin version now highlights the date of the ip2nations database (YYYYMMDD)
  • ADDED: Automatic plugin updates for updated ip2nations db, minor releases, bug fixes as per my own article
  • CHANGED: Plugin refactor to bring it closer in-line with developments made on Simple Firewall and Twitter Bootstrap plugins


  • UPDATED: IP2Nations database to latest version from 16th August 2014
  • UPDATED: Major code refactor for better maintenance going forward.
  • FIXED: Developer mode (using cookies to optimize performance) setting was ignored in some cases.
  • CHANGED: Developer mode is enabled by default.


  • UPDATED: IP2Nations database to version 22nd June 2014
  • FIX: IP Address detection in cases where it's populating with Port number.
  • FIX: shortcode usage of ' html="none" '
  • ADDED: option to manually force the display of the database install option.


  • UPDATED: IP2Nations database to version 22nd March 2014


  • ADDED: Feature to allow you to by-pass W3TC Total Cache PAGE CACHING for pages that use this shortcode. See FAQs.


  • ADDED: A global plugin option to turn HTML printing off. You can turn it off globally, and then override for individual shortcodes using the HTML (v2.9) parameter as and when you need it.


  • UPDATED: IP2Nations database to version 15th January 2013
  • ADDED: Ability to not print shortcode with surrounding HTML. Simply use parameter html="none"


  • FIXED: Call time by reference errors.
  • ADDED: data-detected-country field to the HTML spans that are generated so you can see the exact country code being detected each time.


  • Added a Developer Mode - turn this on to STOP the performance optimization whereby country code data is stored in a cookie to reduce repeat MySQL queries.
  • Ensured that there would be no PHP warning errors associated with WORPIT_DS definition



  • ADDED: A dismiss button for those who have manually installed the IP 2 Nations database.


  • ADDED: Now uses a 24hour cookies to store country code and country name to reduce repeated SQL queries. That is, every visitor that triggers this shortcode will incur only 1 MySQL query on the site.


  • UPDATED: The IP2Nations IP-to-Country database to latest release (August 22, 2012)


  • FIXED: Bug with undefined function error (thanks Merle!)


  • FIXED: Bug with incomplete internationalisation functions. Will complete for a later release.


  • UPDATED: the IP 2 Nation database to the version released 3rd June 2012. You will be prompted to run the database upgrade after the plugin is installed.
  • ADDED: Plugin options/settings page - you must enable any of the 2 main features to use anything from the plugin. This is in order to maximum plugin performance so only the absolutely necessary code is used.
  • ADDED: Automatic Amazon Affiliate links using shortcode: [CBC_AMAZON] . You can also specify Amazon associate tags for each Amazon website and the plugin will automatically use it with the appropriate site and generate an affiliate link for your product ASIN depending on where the visitor is from.
  • ADDED: Plugin now conforms to iControlWP standard plugin structure. Faster, stable and automatically generates options pages.


  • ADDED: Shortcode [CBC_CODE /] - which will print your country code.
  • ADDED: Special case for local testing, where if your IP Address is detected as, country and country code will be detected as 'localhost'.
  • Tidied up the code A LOT.
  • Improved the Admin Notices and DB update process, and is now using the correct WordPress action hooks.
  • Added special case for local testing, where if your IP Address is detected as, country and country code will be 'localhost'.
  • Began coding for adding some nice features later.


  • First Release

Requires: 3.2.0 or higher
Compatible up to: 4.5.3
Last Updated: 2 months ago
Active Installs: 2,000+


4.8 out of 5 stars


1 of 6 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 0,1,0
100,1,1 100,1,1 100,1,1