[cfgeo_{property}]

Geo Controller Individual Shortcodes provide a simple way to display specific geographic information about the current visitor using individual WordPress shortcodes.

The table below shows the available shortcodes and their corresponding geographic values detected for your current connection. You can copy any shortcode and use it in supported WordPress content.

Shortcode Value
[cfgeo_flag]
[cfgeo_ip]
18.97.14.81
[cfgeo_ip_version]
4
[cfgeo_ip_number]
308350545
[cfgeo_ip_dns_host]
1
[cfgeo_ip_dns_provider]
18-97-14-81.crawl.commoncrawl.org
[cfgeo_isp]
Amazon.com, Inc.
[cfgeo_isp_organization]
AWS EC2 (us-east-1)
[cfgeo_isp_as]
AS14618 Amazon.com, Inc.
[cfgeo_isp_asname]
AMAZON-AES
[cfgeo_continent]
North America
[cfgeo_continent_code]
NA
[cfgeo_country]
United States
[cfgeo_country_code]
US
[cfgeo_country_code_3]
USA
[cfgeo_country_code_numeric]
840
[cfgeo_region]
Virginia
[cfgeo_region_code]
VA
[cfgeo_district]
-
[cfgeo_city]
Ashburn
[cfgeo_postcode]
-
[cfgeo_address]
Ashburn, Virginia, (VA), United States
[cfgeo_calling_code]
1
[cfgeo_latitude]
39.04372
[cfgeo_longitude]
-77.48749
[cfgeo_timezone]
America/New_York
[cfgeo_timezone_offset]
-400
[cfgeo_timezone_abbreviation]
EDT
[cfgeo_timestamp]
1791653218
[cfgeo_timestamp_readable]
2026-10-10T13:26:58-04:00
[cfgeo_current_date]
October 10, 2026
[cfgeo_current_time]
13:26:58
[cfgeo_currency]
USD
[cfgeo_currency_symbol]
$
[cfgeo_currency_converter]
1
[cfgeo_base_convert]
USD
[cfgeo_base_convert_symbol]
$
[cfgeo_vat_rate]
-
[cfgeo_browser]
unknown
[cfgeo_browser_version]
unknown
[cfgeo_platform]
undefined
[cfgeo_is_tor]
-

How Individual Geo Shortcodes Work

Each individual shortcode represents a specific geographic property, such as the visitor’s country, city, region, continent, timezone, currency, or IP address.

Unlike the general Geo Controller shortcode, which can retrieve different properties through attributes, individual shortcodes use the property name directly in their shortcode syntax.

For example, to display the visitor’s detected country:

[cfgeo_country]

To display the visitor’s detected city:

[cfgeo_city]

To display the visitor’s detected country code:

[cfgeo_country_code]

Geo Controller processes these shortcodes when WordPress renders the content and replaces them with the corresponding geographic values.

Where Can You Use These Shortcodes?

Individual geographic shortcodes can be inserted into WordPress content areas that support shortcode execution, including:

  • Posts and pages: Display geographic information within articles, landing pages, and other content.
  • Widgets: Add location-specific information to shortcode-enabled widget areas.
  • Page builders: Use compatible shortcode elements or widgets to display geographic values.
  • Custom templates: Execute geographic shortcodes using the native WordPress do_shortcode() function.
  • Custom integrations: Include geographic values in content generated by plugins that support WordPress shortcodes.

Important: Shortcodes only execute in content areas that process WordPress shortcodes. They are not automatically evaluated in every HTML attribute, JavaScript string, or external application.

Practical Examples

Example 1: Personalized Welcome Message

Display a welcome message containing the visitor’s detected country:

Welcome to our website! We are happy to have visitors from [cfgeo_country].

For a visitor detected in Germany, the rendered message might be:

Welcome to our website! We are happy to have visitors from Germany.

Example 2: Location-Based Promotion

Include the visitor’s detected city in a promotional message:

We just found shoes available in [cfgeo_city] that you can buy with a 50% discount.

For a visitor detected in London, the resulting message might be:

We just found shoes available in London that you can buy with a 50% discount.

This example demonstrates content personalization. The shortcode does not verify product availability, pricing, or shipping eligibility for the detected location.

Example 3: Display Multiple Geographic Properties

You can combine several individual shortcodes in the same text block:

Your detected location:
City: [cfgeo_city]
Region: [cfgeo_region]
Country: [cfgeo_country]
Country Code: [cfgeo_country_code]
Continent: [cfgeo_continent]

Each shortcode is processed independently and replaced with the corresponding available geographic value.

Example 4: Display Timezone and Currency

Individual shortcodes can also display geographic timezone and currency information:

Your detected timezone: [cfgeo_timezone]
Your local currency: [cfgeo_currency]

These values are based on the detected geographic location and should not be treated as verified personal preferences or financial information.

Shortcode Parameters

cache

The cache attribute is used by Geo Controller’s AJAX-based cache compatibility mechanism.

When the relevant cache compatibility option is enabled in Geo Controller settings, the plugin can automatically add this attribute to supported individual shortcodes.

Its purpose is to help retrieve visitor-specific geographic information in environments where full-page caching might otherwise cause previously generated geographic values to be displayed to other visitors.

For example, a shortcode with the cache attribute can be represented as:

[cfgeo_country cache]

Note: You normally do not need to add this attribute manually when Geo Controller automatically manages it through the enabled cache compatibility setting.

For additional information, see the Geo Controller Cache Settings documentation.

Shortcode Return Values

Each individual shortcode returns the value associated with its geographic property.

For example:

  • cfgeo_country — detected country name.
  • cfgeo_country_code — detected country code.
  • cfgeo_city — detected city.
  • cfgeo_region — detected region or state.
  • cfgeo_continent — detected continent.
  • cfgeo_timezone — geographic timezone.
  • cfgeo_currency — geographic currency code.

The complete list of supported properties is available in the table at the beginning of this page.

Return values depend on the information available for the visitor’s detected IP address. Some geographic properties may be empty or unavailable.

Using Individual Shortcodes in PHP

Developers can execute individual Geo Controller shortcodes inside WordPress theme and plugin files using do_shortcode().

For example:

<?php
echo esc_html(
    do_shortcode('[cfgeo_country]')
);
?>

For advanced PHP integrations, Geo Controller also provides direct access to geographic information through its PHP helpers.

See the PHP Integration documentation for additional examples.

Geolocation Accuracy and Caching

Geo Controller uses IP-based geolocation to estimate a visitor’s geographic location.

The detected country, city, or region may not always match the visitor’s actual physical location, particularly when using VPN services, proxies, mobile networks, or corporate internet connections.

Full-page caching can also affect geographic shortcode output if the resulting HTML is cached and reused for visitors from different locations.

For location-specific content, review the Geo Controller cache compatibility settings and test your implementation with different geographic locations.

Troubleshooting

The Shortcode Appears as Plain Text

Make sure Geo Controller is active and that the shortcode is inserted into a WordPress content area that supports shortcode execution.

Some page builders and custom HTML fields require a dedicated shortcode widget or explicit shortcode processing.

The Shortcode Returns an Empty Value

Check whether the corresponding geographic property is available for the current visitor.

You can compare the result with the geographic information displayed in the table at the beginning of this page.

The Shortcode Displays an Incorrect Location

Verify the detected IP address and geographic information. Review your caching configuration if different visitors receive identical location-specific output.

Remember that IP geolocation provides an estimate and is not guaranteed to identify a visitor’s exact physical location.

Summary: Individual Geo Controller shortcodes provide a straightforward way to insert visitor-specific geographic values into WordPress content. Choose a shortcode from the live reference table above, place it in a supported content area, and Geo Controller will display the corresponding available geographic information.

Was this page helpful?