Do you mean to redirect the user after he uses the “current location” widget?
No.
I mean a function that detects a visitors city upon visit to the homepage and redirects the user to a pre-assigned city based on the city detected.
In the admin section, a link could be called “geo-redirection” in the left menu.
That page allows the admin to
- Select a country / state / territory
- A second list is displayed showing the cities located in the selected country / state / territory
- A text box appears called “Visitors from this city redirect to what url?” which allows the admin to assign a url redirect based on the selected city
- Save
The result is when a visitor lands on the homepage and is from
Get it? Redirect a visit from the homepage based on the city 🙂
Hey Mr Fitoussi. Just wondering what you thought of my idea.
– efromdc
Hi,
Sorry for the delay but I do not always get notifications on new posts. I randomly check this forum every few days.
For the future you can post anything in GEO my WP’s forum where I am more responsive.
As for your question, it will not be a very simple task since I will need to build an admin part where admins will be able to enter more than a single option for redirection. It might be a nice idea for an add-on for the future.
However, in the new coming version of GEO my Wp ( which I have a beta ready ) I added a hook that fires right after the current location widget is being used. You can use the hook with a simple function that will check the value of the city and redirect the user to a page based on that.
Here you can read more and download the new version