Support » Plugin: WP Geocode Filter » [Plugin: WP Geocode Filter] Display Content by Geo

  • bamajr


    Before I get responses promoting other WordPress Plugins, let me say that I’m not looking for the traditional, change content by geography function.

    I have a client that has four specific telephone numbers, to be used with four specific regions of a single state. There is an additional 1-800 number for the remaining areas in the state, as well as the rest of the US.

    This client wants this telephone number to be located right away, in the header (right side, most likely), and wants the telephone number to change, based on where the user is located.

    I’ve seen quite a few GEO Plugins, for WordPress, including this one, which will regionalize the content in the body (I.E. POST/PAGE) and a couple that extend that functionality into the widgeted areas. However, I’ve yet to find anything, that will allow me to input a list of phone numbers and define a geographical area, for which those phone numbers should display and allow that information to be displayed in a widget.


    1. Does this plugin support this functionality?
    2. Does anyone know of an existing WordPress Plugin, that will support this functionality?
    3. Does anyone know of any API, outside of WordPress, that already supports this functionality?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author mikelynn


    Well – you could accomplish by setting up conditional content blocks leveraging wpgeocode’s conditional shortcodes. To accomplish your specific example, you could set something up like this:

    [wpgc_is_country_names country_names=”United States,Canada”]
    Dial 1-800-xxx-xxxx for more information in US and CA

    [wpgc_is_country_names country_names=”United Kingdom”]
    Dial +1 44 080 xxxx xxxx for more information in United Kingdom


    When a user visits the page or post from US or CA, it will display Dial 1-800-xxx-xxxx for more information in US and CA.

    Let me know if that works and how you make out with your project.




    I was aware of your built-in options to do conditional shortcodes, but I don’t see a way to do conditional shortcodes for zip code.

    [wpgc_is_zipcode" zip code="90210"]
    [wpgc_is_zipcodes" zip codes="90210,55125"]
    [wpgc_is_not_zipcode" zip code="90210"]
    [wpgc_is_not_zipcodes" zip codes="90210,55125"]

    In GeoMarketing, the accuracy of the zip code is the single most important factor and is what MaxMind uses to identify the name of the city.

    Unfortunately, MaxMind’s free database isn’t even accurate enough to determine the correct zip code. The zip code can be off by up to 40 miles. So, in my case, lets say I have a client with stores in St Paul, Minneapolis, Burnsville, White Bear, Maple Grove and Woodbury, Minnesota. According to MaxMind’s Free Database (and your plugin – based off Maxmind’s Free Database), a person, visiting my client’s website, from Woodbury, MN would be directed to the Burnsville location, when there is actually a location right in Woodbury and Maple Grove/White Bear are both much closer than Burnsville.

    So even if you add the zip code features I list above, they will almost never work correctly. Incidentally, this is why the rankings of your plugin are less than satisfactory, though it really has nothing to do with your plugin and everything to do with the Database you incorporate, from MaxMind.



    I thought I would elaborate on my last post…

    I live in Woodbury, MN (55125).

    Google identifies that I’m living in Minneapolis.
    Maxmind’s Free Database says I live in Burnsville, MN, with incorrect zip code.
    Maxmind’s paid Database says I live in St. Paul, MN, but with correct zip code.

    Here is a “TRACEROUTE” of my internet connection to

    Traceroute has started…
    traceroute: Warning: has multiple addresses; using
    traceroute to (, 64 hops max, 72 byte packets
     1 (  2.736 ms  2.919 ms  2.340 ms
     2 (  2.846 ms  4.301 ms  2.988 ms
     3 (  9.059 ms  9.175 ms  7.775 ms
     4 (  8.676 ms  8.673 ms  10.183 ms
     5 (  16.126 ms  11.691 ms  11.312 ms
     6 (  20.102 ms  15.590 ms  22.098 ms
     7 (  22.774 ms  21.307 ms  20.562 ms
     8 (  19.168 ms  34.760 ms  48.229 ms
     9 (  30.622 ms  20.555 ms  18.920 ms
    10 (  22.038 ms  27.371 ms  24.814 ms
    11 (  38.857 ms  49.669 ms  52.282 ms
    12 (  39.008 ms  39.918 ms  41.894 ms
    13 (  41.065 ms  41.276 ms  50.181 ms
    14 (  38.292 ms  39.221 ms  39.565 ms
    15 (  136.009 ms  102.905 ms  42.349 ms
    16 (  40.204 ms  39.636 ms (  43.522 ms
    17 (  64.730 ms  63.590 ms  63.261 ms
    18 (  53.784 ms (  56.395 ms (  52.850 ms
    19 (  65.810 ms (  54.529 ms (  81.452 ms
    20 (  61.469 ms (  79.680 ms (  52.235 ms
    21 (  69.408 ms (  53.412 ms (  62.646 ms
    22 (  67.855 ms (  447.078 ms  558.682 ms

    As you can see, there is not a single hop through Burnsville, MN, but neither is there a hop in Minneapolis, St. Paul nor Woodbury.

    Comcast (my ISP) is less than 10 blocks away and I have a business class line with a Static IP Bank. Some of my Static IP’s are registered as DNS Servers and Several of them are hosting websites.

    My point here is…

    I have been to some websites which identify my location, right away, as Woodbury, MN 55125. I have been to other Websites, who identify me as St. Paul, MN, but with the correct zip code of 55125 (including MaxMind’s Paid Data Base). Then there is Google and the many others, which aren’t even close.

    So, the issue here, isn’t your plugin! The issue is the data source.

    I have a theory that MaxMind’s Free Data is intentionally CORRUPT. If it wasn’t, there would be no need to buy their Paid Database. No other free service is as inaccurate as MaxMind, for my area.


    I have another theory that these inaccuracies are subject to the populous “need” in a given area. In other words, the more “need” for accuracy in a specific area, the more effort these services put in, to provide accurate data.

    In the end, your WordPress Plugin and my website project, is judged harshly, based on the bias of accuracy, which is beyond our control.

    I just downloaded and checked the GeoLite data and I see there are zip codes available for US cities. I’m not sure how accurate they are though.
    Now, I also checked the plugin (wpgeocode.php) and there is no function to create the conditional shortcode to make queries from the zip code table. In other words, [wpgc_is_zipcode”] will not work because this function does not exist. I’m sure if this function is added to wpgeocode.php, then it’ll work.

    Plugin Author mikelynn


    If you would like to see wpgeocode extended to support shortcodes for postal code – I can do that… should take me about 5 minutes or so… hang tight…

    Not sure how accurate it will be but I’m interested in your feedback. I’m also interested in whether the premium maxmind database would provide more accurate results. Perhaps that could be offered as a premium plugin… if it offers greater accuracy… just a thought.

    Should have version 1.0.7 up in about 2 minutes… this will have postal_code support

    [wpgc_postal_code],[wpgc_is_postal_code],[wpgc_is_not_postal_code postal_code=”12342″],[wpgc_is_postal_code postal_code=”12322″],[wpgc_is_not_postal_codes postal_codes=”19232,12323″]

    @harrison O.

    I’m glad you found the same thing I did, and posted about earlier đŸ˜‰

    …and, your assumptions about the accuracy of the zip code is correct, but it is actually bigger than that. I’ve been working on my own GeoLocation Plugin for a while now, basing it off of the GeoLite Data, provided for FREE by MaxMind.

    To put it plainly, their FREE data is garbage! It isn’t just the zip codes that are inaccurate. Their cities are also very inaccurate.

    I actually went as far as emailing MaxMind and accusing them of POISONING their FREE Data, to sell their FEE Data.

    Again, though, I have found no fault in this plugin (WP Geocode Filter) as the functionality works as it is intended. However, this plugin can only be as accurate as the data it uses… right now, that isn’t very accurate – not even accurate enough to use on production websites.


    Hey… I understand that this is your plugin, so if you like my suggestions for ZIP CODES, sure, put it in. However, as I pointed out, above, it isn’t just the ZIP CODE data that is inaccurate. The CITY data is also very inaccurate.

    MaxMind assured me that they don’t POISON their FREE data, but I don’t buy it. The instances I’ve documented, in my testing, are simply too far off, not to be intentional.

    One more thing: MaxMind has some tricky verbiage for licensing. You can’t actually buy and re-sell their Data, for a premium plugin, without paying some exorbitant costs. As a matter of fact, they have told me, It is strictly against their ToS for you to buy and resell their data (license), in the form you would need it, to work with this plugin. You’ll get some song and dance about trying to tell your clients to come buy the data directly from them or to make your premium plugin, use their web services api, which charges a credit card, monthly, based on volume of traffic. Its all BS!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Geocode Filter] Display Content by Geo’ is closed to new replies.