Wordpress: show posts based on location?

Discussion in 'Blogging' started by captchadreams, Mar 7, 2012.

  1. captchadreams

    captchadreams Power Member

    Sep 19, 2008
    Likes Received:
    i've searched around and most of the stuff I'm finding are for showing certain content in a post, displaying ads to certain countries, etc.

    but I haven't found exactly what I'm looking for which is to only show certain posts based on the country they're in.

    for example.

    post 1 - US
    post 2 - US
    post 3 - AUS

    when a visitor visits the site from US they only see posts 1 and 2.. when they visit from AUS they only see post 3.. if a visitor is from CAN they don't see any posts at all.

    does anyone know if a plugin like this is already available?


    if not..
    right now i'm using "just custom fields" plugin

    and I have a custom field on each post where I put in the country code.. I believe I could accomplish this by also installing this plugin:


    and then editing the index, archive, etc where it calls the loop function and adding some php code to show which posts to show based on if the ip2country matches the just custom field.. but i'm not 100% confident on doing this.. but i'll end up trying none the less if I can't find a plugin first.
    Last edited: Mar 7, 2012