Simulate a country, continent or IP

We’ve designed the Geolocation simulation feature for fast testing of the Conditional Blocks Pro Geolocation features without a VPN.

  • Works with all WordPress content blocks using our Geolocation features.
  • Simulation can be used for testing on localhost WordPress development.
  • Trigger geo-content without a VPN.

You must enable Geolocation Simulation to override your location for testing. We understand the content you create with Conditional Blocks could be sensitive, therefore we secure conditional content by default.

Once Geolocation Simulation is turned on, you’ll be able to simulate IP address, countries codes from the url.

Enable Simulation Snippet

Place the snippet within a WordPress plugin for code snippets, theme’s functions.php or wp-config.php file.

// Allow Simulation of IP, Country Codes for Geolocation Conditions.
if ( ! defined( 'CONDITIONAL_BLOCKS_GEOLOCATION_SIMULATION' ) ) {
	define( 'CONDITIONAL_BLOCKS_GEOLOCATION_SIMULATION', true );
}Code language: PHP (php)

Great, you can now begin to simulate dynamic WordPress content as if you were located in another country, or continent.

Simulate a IP Address

Simulating a whole IP Address will automatically detect which country & continent the IP is from.

Here’s a list of IP address you can use for testing https://www.webpagetest.org/addresses.php

https://example.com/?cb_ip=34.106.208.213Code language: PHP (php)

Simulate a Country Code

Instead of using a IP address you can directly insert the country for faster testing.

https://example.com/?cb_country=AUCode language: PHP (php)

Simulate a Continent

You can find all continents codes below.

https://example.com/?cb_continent=EUCode language: PHP (php)

Country Codes

Our system uses two-character ISO 3166 country codes. These codes are internationally recognized and provide a standardized way to identify countries.

  • AF for Afghanistan
  • AX for Åland Islands
  • AL for Albania
  • DZ for Algeria
  • AS for American Samoa
  • AD for Andorra
  • AO for Angola
  • AI for Anguilla
  • AQ for Antarctica
  • AG for Antigua and Barbuda
  • AR for Argentina
  • AM for Armenia
  • AW for Aruba
  • AU for Australia
  • AT for Austria
  • AZ for Azerbaijan
  • BS for Bahamas
  • BH for Bahrain
  • BD for Bangladesh
  • BB for Barbados
  • BY for Belarus
  • PW for Belau
  • BE for Belgium
  • BZ for Belize
  • BJ for Benin
  • BM for Bermuda
  • BT for Bhutan
  • BO for Bolivia
  • BQ for Bonaire, Saint Eustatius and Saba
  • BA for Bosnia and Herzegovina
  • BW for Botswana
  • BV for Bouvet Island
  • BR for Brazil
  • IO for British Indian Ocean Territory
  • BN for Brunei
  • BG for Bulgaria
  • BF for Burkina Faso
  • BI for Burundi
  • KH for Cambodia
  • CM for Cameroon
  • CA for Canada
  • CV for Cape Verde
  • KY for Cayman Islands
  • CF for Central African Republic
  • TD for Chad
  • CL for Chile
  • CN for China
  • CX for Christmas Island
  • CC for Cocos (Keeling) Islands
  • CO for Colombia
  • KM for Comoros
  • CG for Congo (Brazzaville)
  • CD for Congo (Kinshasa)
  • CK for Cook Islands
  • CR for Costa Rica
  • HR for Croatia
  • CU for Cuba
  • CW for Curaçao
  • CY for Cyprus
  • CZ for Czech Republic
  • DK for Denmark
  • DJ for Djibouti
  • DM for Dominica
  • DO for Dominican Republic
  • EC for Ecuador
  • EG for Egypt
  • SV for El Salvador
  • GQ for Equatorial Guinea
  • ER for Eritrea
  • EE for Estonia
  • SZ for Eswatini
  • ET for Ethiopia
  • FK for Falkland Islands
  • FO for Faroe Islands
  • FJ for Fiji
  • FI for Finland
  • FR for France
  • GF for French Guiana
  • PF for French Polynesia
  • TF for French Southern Territories
  • GA for Gabon
  • GM for Gambia
  • GE for Georgia
  • DE for Germany
  • GH for Ghana
  • GI for Gibraltar
  • GR for Greece
  • GL for Greenland
  • GD for Grenada
  • GP for Guadeloupe
  • GU for Guam
  • GT for Guatemala
  • GG for Guernsey
  • GN for Guinea
  • GW for Guinea-Bissau
  • GY for Guyana
  • HT for Haiti
  • HM for Heard Island and McDonald Islands
  • HN for Honduras
  • HK for Hong Kong
  • HU for Hungary
  • IS for Iceland
  • IN for India
  • ID for Indonesia
  • IR for Iran
  • IQ for Iraq
  • IE for Ireland
  • IM for Isle of Man
  • IL for Israel
  • IT for Italy
  • CI for Ivory Coast
  • JM for Jamaica
  • JP for Japan
  • JE for Jersey
  • JO for Jordan
  • KZ for Kazakhstan
  • KE for Kenya
  • KI for Kiribati
  • KW for Kuwait
  • KG for Kyrgyzstan
  • LA for Laos
  • LV for Latvia
  • LB for Lebanon
  • LS for Lesotho
  • LR for Liberia
  • LY for Libya
  • LI for Liechtenstein
  • LT for Lithuania
  • LU for Luxembourg
  • MO for Macao
  • MG for Madagascar
  • MW for Malawi
  • MY for Malaysia
  • MV for Maldives
  • ML for Mali
  • MT for Malta
  • MH for Marshall Islands
  • MQ for Martinique
  • MR for Mauritania
  • MU for Mauritius
  • YT for Mayotte
  • MX for Mexico
  • FM for Micronesia
  • MD for Moldova
  • MC for Monaco
  • MN for Mongolia
  • ME for Montenegro
  • MS for Montserrat
  • MA for Morocco
  • MZ for Mozambique
  • MM for Myanmar
  • NA for Namibia
  • NR for Nauru
  • NP for Nepal
  • NL for Netherlands
  • NC for New Caledonia
  • NZ for New Zealand
  • NI for Nicaragua
  • NE for Niger
  • NG for Nigeria
  • NU for Niue
  • NF for Norfolk Island
  • KP for North Korea
  • MK for North Macedonia
  • MP for Northern Mariana Islands
  • NO for Norway
  • OM for Oman
  • PK for Pakistan
  • PS for Palestinian Territory
  • PA for Panama
  • PG for Papua New Guinea
  • PY for Paraguay
  • PE for Peru
  • PH for Philippines
  • PN for Pitcairn
  • PL for Poland
  • PT for Portugal
  • PR for Puerto Rico
  • QA for Qatar
  • RE for Reunion
  • RO for Romania
  • RU for Russia
  • RW for Rwanda
  • ST for São Tomé and Príncipe
  • BL for Saint Barthélemy
  • SH for Saint Helena
  • KN for Saint Kitts and Nevis
  • LC for Saint Lucia
  • SX for Saint Martin (Dutch part)
  • MF for Saint Martin (French part)
  • PM for Saint Pierre and Miquelon
  • VC for Saint Vincent and the Grenadines
  • WS for Samoa
  • SM for San Marino
  • SA for Saudi Arabia
  • SN for Senegal
  • RS for Serbia
  • SC for Seychelles
  • SL for Sierra Leone
  • SG for Singapore
  • SK for Slovakia
  • SI for Slovenia
  • SB for Solomon Islands
  • SO for Somalia
  • ZA for South Africa
  • GS for South Georgia/Sandwich Islands
  • KR for South Korea
  • SS for South Sudan
  • ES for Spain
  • LK for Sri Lanka
  • SD for Sudan
  • SR for Suriname
  • SJ for Svalbard and Jan Mayen
  • SE for Sweden
  • CH for Switzerland
  • SY for Syria
  • TW for Taiwan
  • TJ for Tajikistan
  • TZ for Tanzania
  • TH for Thailand
  • TL for Timor-Leste
  • TG for Togo
  • TK for Tokelau
  • TO for Tonga
  • TT for Trinidad and Tobago
  • TN for Tunisia
  • TR for Turkey
  • TM for Turkmenistan
  • TC for Turks and Caicos Islands
  • TV for Tuvalu
  • UG for Uganda
  • UA for Ukraine
  • AE for United Arab Emirates
  • GB for United Kingdom (UK)
  • US for United States (US)
  • UM for United States (US) Minor Outlying Islands
  • UY for Uruguay
  • UZ for Uzbekistan
  • VU for Vanuatu
  • VA for Vatican
  • VE for Venezuela
  • VN for Vietnam
  • VG for Virgin Islands (British)
  • VI for Virgin Islands (US)
  • WF for Wallis and Futuna
  • EH for Western Sahara
  • YE for Yemen
  • ZM for Zambia
  • ZW for Zimbabwe

Continent Codes

A two-character ISO 3166-1 code representing the continent associated with the location of the requester’s public IP address. Codes used to identify continents are as follows:

  • AF for Africa
  • AN for Antarctica
  • AS for Asia
  • EU for Europe
  • NA for North America
  • OC for Oceania
  • SA for South America

Customizing

For developers wanting to customize continent assignments for marketing purposes. use the filter conditional_blocks_country_to_continent_map to change each country’s assignment.

Was this page helpful?