Skip Navigation

[Gelöst] Geo redirect function

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

Redirect user, or display different views depends on his location.

Solution:

There isn't such a built-in feature within Toolset, but there is other workaround, for example, you can use shortcode of other plugins to get current user's GEO location:
https://wordpress.org/plugins/search/geo+location/

Then use this shortcode in Views shortcode [wpv-conditional], check which country the user is from, then display different content, see our document.

Relevant Documentation:

https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/

This support ticket is created vor 6 Jahren, 4 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren, 4 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1083188

Tell us what you are trying to do?
- I am trying to show to a user one of the options:
-- either a specific page with a specific Toolset view, depends on his location. (user supposed to redirect instantly with an option to change user's location after or It could be a transfer page or pop-up, where a user could choose its location and be redirected to the right page/view)
-- show specific toolset posts/views based on user's location.
Basically, I want the following: when a user clicks on the products page, he gets the page with products, related to the province, where he/she is located.

Is there any documentation that you are following?
- I checked lots of your articles and posts about Toolset map and GEOlocation, but I couldn't find GEO redirect specificaly,

Is there a similar example that we can see?
- sorry, can't remember where I saw a similar example... ((

What is the link to your site?
- I am trying to implement this here versteckter Link

Thank you!

#1083631

Hello,

There isn't such a built-in feature within Toolset, but there is other workaround, for example, you can use shortcode of other plugins to get current user's GEO location:
https://wordpress.org/plugins/search/geo+location/

Then use this shortcode in Views shortcode [wpv-conditional], check which country the user is from, then display different content, see our document:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/

#1083767

Thank you! I will try that

#1084315

You are welcome.