Created
August 14, 2015 12:18
-
-
Save webgurus/ab3e8adcea5e143e0c75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$geo = Wpengine\Geoip::instance(); | |
if($geo->country()=='RO') { | |
$country = 'Romania'; | |
} elseif($geo->country()=='UK') { | |
$country = 'United Kingdom'; | |
} elseif($geo->country()=='US') { | |
$country = 'United States'; | |
} | |
?> | |
<article class="post"> | |
<p>This content is visible only for <strong><?=$country?></strong>. <br /><small>How’s the weather in <?=$geo->city()?>, <?=$geo->country()?>, <?=$geo->continent()?>?</small></p> | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment