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.
AFfor AfghanistanAXfor Åland IslandsALfor AlbaniaDZfor AlgeriaASfor American SamoaADfor AndorraAOfor AngolaAIfor AnguillaAQfor AntarcticaAGfor Antigua and BarbudaARfor ArgentinaAMfor ArmeniaAWfor ArubaAUfor AustraliaATfor AustriaAZfor AzerbaijanBSfor BahamasBHfor BahrainBDfor BangladeshBBfor BarbadosBYfor BelarusPWfor BelauBEfor BelgiumBZfor BelizeBJfor BeninBMfor BermudaBTfor BhutanBOfor BoliviaBQfor Bonaire, Saint Eustatius and SabaBAfor Bosnia and HerzegovinaBWfor BotswanaBVfor Bouvet IslandBRfor BrazilIOfor British Indian Ocean TerritoryBNfor BruneiBGfor BulgariaBFfor Burkina FasoBIfor BurundiKHfor CambodiaCMfor CameroonCAfor CanadaCVfor Cape VerdeKYfor Cayman IslandsCFfor Central African RepublicTDfor ChadCLfor ChileCNfor ChinaCXfor Christmas IslandCCfor Cocos (Keeling) IslandsCOfor ColombiaKMfor ComorosCGfor Congo (Brazzaville)CDfor Congo (Kinshasa)CKfor Cook IslandsCRfor Costa RicaHRfor CroatiaCUfor CubaCWfor CuraçaoCYfor CyprusCZfor Czech RepublicDKfor DenmarkDJfor DjiboutiDMfor DominicaDOfor Dominican RepublicECfor EcuadorEGfor EgyptSVfor El SalvadorGQfor Equatorial GuineaERfor EritreaEEfor EstoniaSZfor EswatiniETfor EthiopiaFKfor Falkland IslandsFOfor Faroe IslandsFJfor FijiFIfor FinlandFRfor FranceGFfor French GuianaPFfor French PolynesiaTFfor French Southern TerritoriesGAfor GabonGMfor GambiaGEfor GeorgiaDEfor GermanyGHfor GhanaGIfor GibraltarGRfor GreeceGLfor GreenlandGDfor GrenadaGPfor GuadeloupeGUfor GuamGTfor GuatemalaGGfor GuernseyGNfor GuineaGWfor Guinea-BissauGYfor GuyanaHTfor HaitiHMfor Heard Island and McDonald IslandsHNfor HondurasHKfor Hong KongHUfor HungaryISfor IcelandINfor IndiaIDfor IndonesiaIRfor IranIQfor IraqIEfor IrelandIMfor Isle of ManILfor IsraelITfor ItalyCIfor Ivory CoastJMfor JamaicaJPfor JapanJEfor JerseyJOfor JordanKZfor KazakhstanKEfor KenyaKIfor KiribatiKWfor KuwaitKGfor KyrgyzstanLAfor LaosLVfor LatviaLBfor LebanonLSfor LesothoLRfor LiberiaLYfor LibyaLIfor LiechtensteinLTfor LithuaniaLUfor LuxembourgMOfor MacaoMGfor MadagascarMWfor MalawiMYfor MalaysiaMVfor MaldivesMLfor MaliMTfor MaltaMHfor Marshall IslandsMQfor MartiniqueMRfor MauritaniaMUfor MauritiusYTfor MayotteMXfor MexicoFMfor MicronesiaMDfor MoldovaMCfor MonacoMNfor MongoliaMEfor MontenegroMSfor MontserratMAfor MoroccoMZfor MozambiqueMMfor MyanmarNAfor NamibiaNRfor NauruNPfor NepalNLfor NetherlandsNCfor New CaledoniaNZfor New ZealandNIfor NicaraguaNEfor NigerNGfor NigeriaNUfor NiueNFfor Norfolk IslandKPfor North KoreaMKfor North MacedoniaMPfor Northern Mariana IslandsNOfor NorwayOMfor OmanPKfor PakistanPSfor Palestinian TerritoryPAfor PanamaPGfor Papua New GuineaPYfor ParaguayPEfor PeruPHfor PhilippinesPNfor PitcairnPLfor PolandPTfor PortugalPRfor Puerto RicoQAfor QatarREfor ReunionROfor RomaniaRUfor RussiaRWfor RwandaSTfor São Tomé and PríncipeBLfor Saint BarthélemySHfor Saint HelenaKNfor Saint Kitts and NevisLCfor Saint LuciaSXfor Saint Martin (Dutch part)MFfor Saint Martin (French part)PMfor Saint Pierre and MiquelonVCfor Saint Vincent and the GrenadinesWSfor SamoaSMfor San MarinoSAfor Saudi ArabiaSNfor SenegalRSfor SerbiaSCfor SeychellesSLfor Sierra LeoneSGfor SingaporeSKfor SlovakiaSIfor SloveniaSBfor Solomon IslandsSOfor SomaliaZAfor South AfricaGSfor South Georgia/Sandwich IslandsKRfor South KoreaSSfor South SudanESfor SpainLKfor Sri LankaSDfor SudanSRfor SurinameSJfor Svalbard and Jan MayenSEfor SwedenCHfor SwitzerlandSYfor SyriaTWfor TaiwanTJfor TajikistanTZfor TanzaniaTHfor ThailandTLfor Timor-LesteTGfor TogoTKfor TokelauTOfor TongaTTfor Trinidad and TobagoTNfor TunisiaTRfor TurkeyTMfor TurkmenistanTCfor Turks and Caicos IslandsTVfor TuvaluUGfor UgandaUAfor UkraineAEfor United Arab EmiratesGBfor United Kingdom (UK)USfor United States (US)UMfor United States (US) Minor Outlying IslandsUYfor UruguayUZfor UzbekistanVUfor VanuatuVAfor VaticanVEfor VenezuelaVNfor VietnamVGfor Virgin Islands (British)VIfor Virgin Islands (US)WFfor Wallis and FutunaEHfor Western SaharaYEfor YemenZMfor ZambiaZWfor 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:
AFfor AfricaANfor AntarcticaASfor AsiaEUfor EuropeNAfor North AmericaOCfor OceaniaSAfor 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.