PHPackages                             pantheon-systems/pantheon-geolocation-shortcodes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pantheon-systems/pantheon-geolocation-shortcodes

AbandonedArchivedWordpress-plugin[Utility &amp; Helpers](/categories/utility)

pantheon-systems/pantheon-geolocation-shortcodes
================================================

Used with the Pantheon WordPress Edge Integrations SDK, allows sites to use shortcodes to display geolocated content.

0.3.0(3y ago)11.7kMITPHP

Since Feb 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pantheon-systems/pantheon-geolocation-shortcodes)[ Packagist](https://packagist.org/packages/pantheon-systems/pantheon-geolocation-shortcodes)[ RSS](/packages/pantheon-systems-pantheon-geolocation-shortcodes/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

Pantheon Geolocation Shortcodes
===============================

[](#pantheon-geolocation-shortcodes)

Stable tag: 0.3.0
Requires at least: 3.7
Tested up to: 5.9.1
Requires PHP: 7.4
License: MIT
Tags: pantheon, geolocation, shortcodes, edge integrations, agcdn, geoip, personalization
Contributors: jazzs3quence, getpantheon

Used with the [Pantheon WordPress Edge Integrations SDK](https://github.com/pantheon-systems/edge-integrations-wordpress-sdk), this plugin allows sites to use shortcodes to display geolocated content.

Archived project
----------------

[](#archived-project)

This project is **archived** as of August 2024 as it no longer receives active development. The architecture provided by the tools in this SDK and the related projects are still valid and will continue to work on Pantheon AGCDN. However, we will not be responding to issues or pull requests or building these tools out more than they are already.

[![Unsupported](https://camo.githubusercontent.com/628b81b854d88f0f44cf81e33f54ab504377a35db3986497241f6d5d75c01a2b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70616e7468656f6e2d646570726563617465642d79656c6c6f773f6c6f676f3d70616e7468656f6e26636f6c6f723d464644433238)](https://docs.pantheon.io/oss-support-levels#deprecated) [![Pantheon Geolocation Shortcodes](https://github.com/pantheon-systems/pantheon-geolocation-shortcodes/actions/workflows/main.yml/badge.svg)](https://github.com/pantheon-systems/pantheon-geolocation-shortcodes/actions/workflows/main.yml/badge.svg)

Description
-----------

[](#description)

This plugin allows you to quickly add geolocated content to your site by using shortcodes.

In order for the geolocated content to appear on your site, you must be a Pantheon customer with Advanced Global CDN active on your site. In addition, you must already have the [Pantheon WordPress Edge Integrations](https://github.com/pantheon-systems/pantheon-wordpress-edge-integrations) plugin installed.

Installation
------------

[](#installation)

### Install via Composer

[](#install-via-composer)

The recommended way to install the plugin is via Composer.

```
composer require pantheon-systems/pantheon-geolocation-shortcodes
```

The package is set as a `wordpress-plugin` so it should be installed alongside other WordPress plugins in your project.

### Install via WordPress.org

[](#install-via-wordpressorg)

Download the plugin from [WordPress.org](https://wordpress.org/plugins/pantheon-geolocation-shortcodes/) and upload it to your WordPress installation. Before activation, make sure you also have the [Pantheon WordPress Edge Integrations](https://wordpress.org/plugins/pantheon-wordpress-edge-integrations/) plugin installed. If it is not found, this plugin cannot activate.

### Install manually

[](#install-manually)

The plugin can also be installed manually like a normal plugin. Find the latest release on the [Releases](https://github.com/pantheon-systems/pantheon-geolocation-shortcodes/releases) page and download the ZIP file.

Extract the contents of the ZIP file into your `wp-content/plugins` directory and upload or commit to your server.

### Requirements

[](#requirements)

This plugin does *not* install the Pantheon WordPress Edge Integrations SDK or the [Pantheon WordPress Edge Integrations plugin](https://github.com/pantheon-systems/pantheon-wordpress-edge-integrations). Those must be installed separately. While the SDK is not explicitly required as a dependency, the WordPress Edge Integrations plugin *is* required for the Geolocation plugin to function.

Addititionally, Pantheon Advanced Global CDN must be active and configured for Geolocation shortcodes to work.

Any other plugins that use the `[geoip]` shortcode should be uninstalled or deactivated before using Pantheon Geolocation Shortcodes.

Updating
--------

[](#updating)

Updating the plugin depends on how you installed it. If you installed it via Composer, you can update it via Composer depending on your version constraints. See [Versions and constraints](https://getcomposer.org/doc/articles/versions.md) for more information.

If you installed the plugin manually, you can update it by downloading the latest release on the [Releases](https://github.com/pantheon-systems/pantheon-geolocation-shortcodes/releases) page and extracting the contents of the ZIP file into your `wp-content/plugins` directory.

If you've installed the plugin via the WordPress.org plugin repository, updates can be installed normally like other plugin updates.

Usage
-----

[](#usage)

You can use the following shortcodes to display geolocated content based on where the visitor is located:

1. **Continent:** `[geoip-continent]`, the two-letter continent code, e.g. "NA"
2. **Country:** `[geoip-country]`, the two-letter country code, e.g. "US"
3. **Region:** `[geoip-region]`, a two-letter region code, e.g. "CA"
4. **City:** `[geoip-city]`, the full city name, e.g. "San Francisco"
5. **Location:** `[geoip-location]`, a combination of city, region, country, if all information is available, e.g. "San Francisco, CA, US"

### Localized content

[](#localized-content)

In addition, you can also use the `geoip-content` shortcode to apply logic to content within your posts. The `geoip-content` shortcode can be used with any of the above parameters as well as allowing the ability to explicitly *exclude* locations. Below are the available options that can be passed to the `geoip-content` shortcode:

- `continent`
- `country`
- `region`
- `city`
- `not_continent`
- `not_country`
- `not_region`
- `not_city`

#### Examples

[](#examples)

Say you want to show content just to your US visitors. You can use the following shortcode:

```
[geoip-content country="US"]This is content just for US visitors.[/geoip-content]

```

Perhaps you just want to show content to visitors from specific regions. You can use the following shortcode:

```
[geoip-content region="CA, TX"]This is content exclusively for visitors from California and Texas.[/geoip-content]

```

You can also mix and match geography and negative geography options to add more complex logic. For example, if you wanted to show content to visitors from California and Texas, but not to visitors from Los Angeles. You can use the following shortcode:

```
[geoip-content region="CA, TX" not_city="Los Angeles"]This is content for visitors from California and Texas, but not from Los Angeles.[/geoip-content]

```

#### Duplicate location names

[](#duplicate-location-names)

If multiple locations in your regions have the same name, you may need to adjust the logic to ensure that the correct content is shown to the correct visitors. For example, if you were showing the same content to visitors from the United States, Europe and Australia, but wanted to exclude *Dublin*, Ireland, you would need to use the following shortcodes:

```
[geoip-content country="US, AU"]Fly to Dublin, Ireland for a weekend getaway for only $199![/geoip-content][geoip-content country="EU" not_city="Dublin"]Fly to Dublin, Ireland for a weekend getaway for only $199![/geoip-content]

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

6

Last Release

1453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a89f5f15357797cbd6ec7833a28626478ae3c0ceb5fa1faa8a26d0960584c65?d=identicon)[pantheon-systems](/maintainers/pantheon-systems)

![](https://www.gravatar.com/avatar/af6c0ce1d250a8a8edc57b4759dabc3d5f7956fc105450bba7fc5d2eb5b74362?d=identicon)[jazzsequence](/maintainers/jazzsequence)

---

Top Contributors

[![jazzsequence](https://avatars.githubusercontent.com/u/991511?v=4)](https://github.com/jazzsequence "jazzsequence (92 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

edge-integrationsgeoipgeolocationshortcodeswordpresswordpress-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pantheon-systems-pantheon-geolocation-shortcodes/health.svg)

```
[![Health](https://phpackages.com/badges/pantheon-systems-pantheon-geolocation-shortcodes/health.svg)](https://phpackages.com/packages/pantheon-systems-pantheon-geolocation-shortcodes)
```

###  Alternatives

[mhujer/jms-serializer-uuid

Uuid serializer and deserializer for JMS Serializer library

291.2M4](/packages/mhujer-jms-serializer-uuid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
