WP Geocode Filter

WP Geocode enables WordPress publishers to customize content based on the Geolocation information of the reader. WP Geocode implements shortcodes tha

Author:Michael Lynn (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:4.0
Plugin version:1.0.13
Added to WordPress repository:01-07-2011
Last updated:14-10-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:98
Rated by:7
Plugin URI:http://www.wpgeocode.com
Total downloads:6 730
plugin download
Click to start download

WP Geocode enables WordPress publishers to customize content based on the Geolocation information of the reader.

WP Geocode implements shortcodes that let publishers incorporate reader's geolocation data into posts, and post titles. Additionally, publishers can use shortcodes in posts which let them tailor post content to the reader based on proximity or location. This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.

Use WP Geocode to customize the content of your blog based on the geographic location of your readers.

Available Filter Shortcodes

This filter content in the article body, title based on the reader's geolocation data:

  • [wpgc_ip] - IP Address of the reader
  • [wpgc_city] - City of the reader
  • [wpgc_state_code] - Two letter State code of the reader
  • [wpgc_country_name] - Country name of the reader
  • [wpgc_country_code] - Two letter Country code of the reader
  • [wpgc_country_flag] - Display the country flag of the reader
  • [wpgc_latitude] - Latitude of the reader
  • [wpgc_longitude] - Latitude of the reader

Conditional Shortcodes - Only available in the body of the post:

  • [wpgc_is_city_and_state city="Yardley" state_code="PA"]
  • [wpgc_is_ip" ip="xx.xx.xx.xx"]
  • [wpgc_is_ips" ip="xx.xx.xx.xx,aa.bb.cc.dd"]
  • [wpgc_is_not_ip" ip="xx.xx.xx.xx"]
  • [wpgc_is_not_ips" ip="xx.xx.xx.xx,aa.bb.cc.dd"]
  • [wpgc_is_city" city=""]
  • [wpgc_is_cities" cities="city one,city two,city three"]
  • [wpgc_is_not_city" city=""]
  • [wpgc_is_not_cities" cities="city one,city two,city three"]
  • [wpgc_is_nearby"] - Uses the value you specify in the Nearby Range setting from the administrative panel
  • [wpgc_is_not_nearby"]
  • [wpgc_is_within" miles="10"]
  • [wpgc_is_within kilometers="12"]
  • [wpgc_is_country_name" country_name=""]
  • [wpgc_is_country_names" country_name="United States,Egypt,Albania"]
  • [wpgc_is_country_code" country_code=""]
  • [wpgc_is_country_codes" country_codes="US,GB,AZ"]
  • [wpgc_is_state_code" state_code=""]
  • [wpgc_is_state_codes" state_codes="PA,NJ,TX"]
  • [wpgc_is_not_country_name" country_name=""]
  • [wpgc_is_not_country_names" country_names="United States,Egypt,Albania"]
  • [wpgc_is_not_country_code" country_code=""]
  • [wpgc_is_not_country_codes" country_codes="US,GB,AZ"]
  • [wpgc_is_not_state_code" state_code=""]
  • [wpgc_is_not_state_codes" state_codes="PA,NJ,TX"]

Examples

[wpgc_is_nearby] Hi Neighbor! [/wpgc_is_nearby] - Will display "Hi Neighbor!" to readers within a configurable distance from your home base.
[wpgc_is_within miles=10] Come on over! [/wpgc_is_within] - Will display "Come on over!" in the post body if the user is viewing the post from within 10 miles.
[wpgc_is_ip ip=123.123.123.123] I used to own this IP Address [/wpgc_is_ip] - Will display the message only if the user has that specific IP Address.
[wpgc_is_city city="Yardley"] Hello Fellow Yardlian [/wpgc_is_city] - Will display the message only if the user has that specific IP Address.
[wpgc_is_not_cities cities="Yardley,Morrisville"] Glad you don't live in Yardley or Morrisville? [/wpgc_is_not_cities] - Will display only when visitor is not viewing the page from Yardley or Morrisville

Configurable options allow you to set a default phrase for each available shortcode in the event that the user was unable to be geo-located.