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.213
Code 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=AU
Code language: PHP (php)
Simulate a Continent
You can find all continents codes below.
https://example.com/?cb_continent=EU
Code 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 AfghanistanAX
for Åland IslandsAL
for AlbaniaDZ
for AlgeriaAS
for American SamoaAD
for AndorraAO
for AngolaAI
for AnguillaAQ
for AntarcticaAG
for Antigua and BarbudaAR
for ArgentinaAM
for ArmeniaAW
for ArubaAU
for AustraliaAT
for AustriaAZ
for AzerbaijanBS
for BahamasBH
for BahrainBD
for BangladeshBB
for BarbadosBY
for BelarusPW
for BelauBE
for BelgiumBZ
for BelizeBJ
for BeninBM
for BermudaBT
for BhutanBO
for BoliviaBQ
for Bonaire, Saint Eustatius and SabaBA
for Bosnia and HerzegovinaBW
for BotswanaBV
for Bouvet IslandBR
for BrazilIO
for British Indian Ocean TerritoryBN
for BruneiBG
for BulgariaBF
for Burkina FasoBI
for BurundiKH
for CambodiaCM
for CameroonCA
for CanadaCV
for Cape VerdeKY
for Cayman IslandsCF
for Central African RepublicTD
for ChadCL
for ChileCN
for ChinaCX
for Christmas IslandCC
for Cocos (Keeling) IslandsCO
for ColombiaKM
for ComorosCG
for Congo (Brazzaville)CD
for Congo (Kinshasa)CK
for Cook IslandsCR
for Costa RicaHR
for CroatiaCU
for CubaCW
for CuraçaoCY
for CyprusCZ
for Czech RepublicDK
for DenmarkDJ
for DjiboutiDM
for DominicaDO
for Dominican RepublicEC
for EcuadorEG
for EgyptSV
for El SalvadorGQ
for Equatorial GuineaER
for EritreaEE
for EstoniaSZ
for EswatiniET
for EthiopiaFK
for Falkland IslandsFO
for Faroe IslandsFJ
for FijiFI
for FinlandFR
for FranceGF
for French GuianaPF
for French PolynesiaTF
for French Southern TerritoriesGA
for GabonGM
for GambiaGE
for GeorgiaDE
for GermanyGH
for GhanaGI
for GibraltarGR
for GreeceGL
for GreenlandGD
for GrenadaGP
for GuadeloupeGU
for GuamGT
for GuatemalaGG
for GuernseyGN
for GuineaGW
for Guinea-BissauGY
for GuyanaHT
for HaitiHM
for Heard Island and McDonald IslandsHN
for HondurasHK
for Hong KongHU
for HungaryIS
for IcelandIN
for IndiaID
for IndonesiaIR
for IranIQ
for IraqIE
for IrelandIM
for Isle of ManIL
for IsraelIT
for ItalyCI
for Ivory CoastJM
for JamaicaJP
for JapanJE
for JerseyJO
for JordanKZ
for KazakhstanKE
for KenyaKI
for KiribatiKW
for KuwaitKG
for KyrgyzstanLA
for LaosLV
for LatviaLB
for LebanonLS
for LesothoLR
for LiberiaLY
for LibyaLI
for LiechtensteinLT
for LithuaniaLU
for LuxembourgMO
for MacaoMG
for MadagascarMW
for MalawiMY
for MalaysiaMV
for MaldivesML
for MaliMT
for MaltaMH
for Marshall IslandsMQ
for MartiniqueMR
for MauritaniaMU
for MauritiusYT
for MayotteMX
for MexicoFM
for MicronesiaMD
for MoldovaMC
for MonacoMN
for MongoliaME
for MontenegroMS
for MontserratMA
for MoroccoMZ
for MozambiqueMM
for MyanmarNA
for NamibiaNR
for NauruNP
for NepalNL
for NetherlandsNC
for New CaledoniaNZ
for New ZealandNI
for NicaraguaNE
for NigerNG
for NigeriaNU
for NiueNF
for Norfolk IslandKP
for North KoreaMK
for North MacedoniaMP
for Northern Mariana IslandsNO
for NorwayOM
for OmanPK
for PakistanPS
for Palestinian TerritoryPA
for PanamaPG
for Papua New GuineaPY
for ParaguayPE
for PeruPH
for PhilippinesPN
for PitcairnPL
for PolandPT
for PortugalPR
for Puerto RicoQA
for QatarRE
for ReunionRO
for RomaniaRU
for RussiaRW
for RwandaST
for São Tomé and PríncipeBL
for Saint BarthélemySH
for Saint HelenaKN
for Saint Kitts and NevisLC
for Saint LuciaSX
for Saint Martin (Dutch part)MF
for Saint Martin (French part)PM
for Saint Pierre and MiquelonVC
for Saint Vincent and the GrenadinesWS
for SamoaSM
for San MarinoSA
for Saudi ArabiaSN
for SenegalRS
for SerbiaSC
for SeychellesSL
for Sierra LeoneSG
for SingaporeSK
for SlovakiaSI
for SloveniaSB
for Solomon IslandsSO
for SomaliaZA
for South AfricaGS
for South Georgia/Sandwich IslandsKR
for South KoreaSS
for South SudanES
for SpainLK
for Sri LankaSD
for SudanSR
for SurinameSJ
for Svalbard and Jan MayenSE
for SwedenCH
for SwitzerlandSY
for SyriaTW
for TaiwanTJ
for TajikistanTZ
for TanzaniaTH
for ThailandTL
for Timor-LesteTG
for TogoTK
for TokelauTO
for TongaTT
for Trinidad and TobagoTN
for TunisiaTR
for TurkeyTM
for TurkmenistanTC
for Turks and Caicos IslandsTV
for TuvaluUG
for UgandaUA
for UkraineAE
for United Arab EmiratesGB
for United Kingdom (UK)US
for United States (US)UM
for United States (US) Minor Outlying IslandsUY
for UruguayUZ
for UzbekistanVU
for VanuatuVA
for VaticanVE
for VenezuelaVN
for VietnamVG
for Virgin Islands (British)VI
for Virgin Islands (US)WF
for Wallis and FutunaEH
for Western SaharaYE
for YemenZM
for ZambiaZW
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 AfricaAN
for AntarcticaAS
for AsiaEU
for EuropeNA
for North AmericaOC
for OceaniaSA
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.