Problem:
I am afraid the pages cannot be loaded in China mainland. vice verse, if adding that code will strongly slow down my site. the pages will even not be loaded.
Solution:
there is a simple workaround, you can get the visitor IP address, so you can know which country are they from, then check the country value, then display the google map or not, I tested it in your website, with these steps:
1) Install plugin "GeoIP Detection"
2) Dashboard-> Toolset-> Front-end Content
option "Third-party shortcode arguments", fill the shortcode name "geoip_detect2"
https://github.com/yellowtree/wp-geoip-detect/wiki/API-Documentation
3) Use Views shortcode [wpv-conditional] to check the country value, then display what you want, see the example:
Your country is: [geoip_detect2 property="country"] <hr /> [wpv-conditional if="'[geoip_detect2 property="country"]' = 'CHINA'" evaluate="false"] Here display the google map [/wpv-conditional] [wpv-conditional if="'[geoip_detect2 property="country"]' = 'CHINA'" ] You are in [geoip_detect2 property="country"], Don't display the google map! [/wpv-conditional]
Relevant Documentation:
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)
This topic contains 15 replies, has 2 voices.
Last updated by 6 years, 9 months ago.
Assisted by: Luo Yang.