Skip to content

Instantly share code, notes, and snippets.

@ryanshoover
Last active August 29, 2015 14:21
Show Gist options
  • Save ryanshoover/c024b414a1153baed6e4 to your computer and use it in GitHub Desktop.
Save ryanshoover/c024b414a1153baed6e4 to your computer and use it in GitHub Desktop.
<h2>Shortcode models</h2>
For each heading below, you'll see shortcode content appear <i>if </i>you're in the right area.
To spoof being in an area, add this to your URL
<pre>http://mywebsite.com/?geoip&amp;country=US </pre>
Note that <pre> country </pre> and <pre> US </pre> can be any values you want.
---
<h3>North America</h3>
<strong>Shortcode: </strong> &#91;geoip-content continent="NA"&#93; Content *just* for NA visitors &#91;/geoip-content&#93;
<strong>Result: </strong> [geoip-content continent="NA"] Content *just* for NA visitors [/geoip-content]
---
<h3>United States</h3>
<strong>Shortcode: </strong> &#91;geoip-content country="US"&#93; Content *just* for US visitors &#91;/geoip-content&#93;
<strong>Result: </strong> [geoip-content country="US"] Content *just* for US visitors [/geoip-content]
---
<h3>Not Houston</h3>
<strong>Shortcode: </strong> &#91;geoip-content not-city="Houston"&#93; Content for everyone *not* in Houston &#91;/geoip-content&#93;
<strong>Result: </strong> [geoip-content not-city="Houston"] Content for everyone *not* in Houston [/geoip-content]
---
<h3>Not San Francisco</h3>
<strong>Shortcode: </strong> &#91;geoip-content not_city="San Francisco"&#93; Content for everyone *not* in San Fran &#91;/geoip-content&#93;
<strong>Result: </strong> [geoip-content not_city="San Francisco"] Content for everyone *not* in San Fran [/geoip-content]
---
<h3>Texas or California</h3>
<strong>Shortcode: </strong> &#91;geoip-content region="TX, CA."&#93; Content *just* for everyone in Texas and California &#91;/geoip-content&#93;
<strong>Result: </strong> [geoip-content region="TX, CA."] Content *just* for everyone in Texas and California [/geoip-content]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment