Support » Plugins » Sidebar Widget Information Depending on User Location

  • Hi Everyone,

    I would like to set up a widget on the side bar of my WP site that gives the details of a particular sales person depending on which state the visitor is viewing the site from.

    An example would be if a visitor is viewing the site in Sydney (NSW), then the side bar widget will populate an image, along with the person’s details that is responsible for looking after the state.

    Same would apply for the rest of the states.

    Any help or advice would be much appreciated.



Viewing 2 replies - 1 through 2 (of 2 total)
  • I think you *may* have a problem with this. Usually, getting this type of information is really buggy – mainly because it’s gathered from the location of the server that the end user is getting his connection from. The server is not always in the same area as the end user. You can obtain the IP address and try to get a location form that – you may end up closer, but it still won’t get it right many times. For instance, I’ve gone to several sites that indicate where I am by looking up my IP address, and every time they put me in New Hampshire. I live in Connecticut. If I want to go to New Hampshire, I have to drive about 5 or 6 hours. (When I lived in West Virginia, it always put me in Columbus, OH – a solid 2.5 hour drive away.) I’ve *never* had someone write a script that can pinpoint where I am located and get it right. The only time it’s been correct is when I have my GPS turned on with my iPhone 😉

    You’d be much better off writing something that provides a dropdown list of states that the end user can choose from, and once submitted, shows who they need to contact. Much more reliable and easier to code.



    Get a Google Latitude account and post your location to that. There are several widgets that will display that information.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar Widget Information Depending on User Location’ is closed to new replies.