How to tag playing section on site based Geo location?

Is it possible to make the playing section on my site play based on the Geo location?

This is my site http://classichits.ie/

On the homepage you will see “Cork, dublin, Limerick, Galway” written.

I want that part to work as per the Geo location.

Is there any wordpress plugin free or paid which can do this job?

Or is it possible to achieve this using JS?

Please help me out.

Wouldn’t it make more sense to sort out one problem at a time?

Sure,

Actually that one is only for mobile.

But, this one is for both and more important for me.

thanks again.

I really don’t think that would be a reliable method to detect which page to serve,. You’re anticipating that your visitors’ IP addresses will accurately reflect their location, but that’s not necessarily the case. (My own IP address misreports my location by over 400 miles.)

1 Like

JS can do this, but the user has to consent to their location being detected.

1 Like

yes ofcourse.

can you please help me with the code.

I am kinda beginner and dont have much knowledge.

Thanks a million again.

JS is not really my thing, but I have some code at home that does this, that I found somewhere when I searched on-line for something like this.
I’m not at home right now, so don’t have it to hand.

2 Likes

Alright.

Can you please tell me, ones you reach home.

And also, what did you search online ? I mean what do I call this ?

Try searching geo location script or something like.

It might make more sense to ask the visitor’s location/preference from your locations and (with their permission) store the result in a cookie for future visits.

3 Likes

I would also suggest that as those places look like links, they ought to behave like links and be manually selectable. (I might live in one place, but regularly visit another, and so want to view more than one of them.) At the moment, they’re just frustrating because they do nothing.

hmm. You are right.

But, there sole purpose is to change as per user’s geolocation. If the person is from Galway then it should change to Galway and so on

And if I’m from somewhere else, and planning to visit one of these places? If I live halfway between Dublin and Cork? What happens then?

It would be much better, IMHO, to use a dropdown or something similar to select area. The current design just looks like broken links.

3 Likes

I think this is where I found the code. This script shows your location on a google map, but I suppose once you get the coords, you can do whatever you like with that data.
Interestingly, it does not have to rely on a GPS enabled mobile device. Running it on my laptop with a wifi connection and no GPS, it seems surprisingly accurate.

This article by the same author may be more relevant to your needs.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.