Title: Pre questions
Last modified: September 19, 2019

---

# Pre questions

 *  Resolved [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/pre-questions/)
 * > Visitor location – detect visitor’s Country
 * Can it hide based on regions in a country as well, let’s say states in the US?
   Does it load any js and API for this feature? I assume so please tell me more,
   since I want it as lightweight as possible.
 * It uses condition and does not output the link in the HTML code. basically it
   does not only hide with CSS and `display:none;`
    -  This topic was modified 6 years, 10 months ago by [Rookie](https://wordpress.org/support/users/alriksson/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Andrei](https://wordpress.org/support/users/andreiigna/)
 * (@andreiigna)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/pre-questions/#post-12000235)
 * Hi,
 * Thanks for the interest in using our plugins!
 * At the moment the location visibility rule supports only countries, and not states
   or cities.
    Location is detect by visitor IP, and this is not always accurate
   for levels below a country [https://geotargetly.com/ip-geolocation-databases](https://geotargetly.com/ip-geolocation-databases)
 * There’s no extra JavaScript added on website, location check is done through 
   WordPress hooks for menus. Location data for a visitor is retrieved once periodically,
   and then cached in WordPress to make page views load as fast as possible.
 * By using Cloudflare for a website, the location check is even faster. The external
   API is not used and location info is retrieved directly by headers returned by
   Cloudflare [https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do-](https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do-)
 * Hope this helps
    -  This reply was modified 6 years, 9 months ago by [Andrei](https://wordpress.org/support/users/andreiigna/).
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/pre-questions/#post-12001979)
 * Thanks for the replies.
 * The state and city level is pretty critical. 2019 I think this should be possible
   but maybe not with the database you use. Some things can be used for the country
   but some are critical for me to be state/city level.
 * Maybe something you would look into in the future?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pre questions’ is closed to new replies.

 * ![](https://ps.w.org/if-menu/assets/icon-256x256.png?rev=1862232)
 * [If Menu - Visibility control for Menus](https://wordpress.org/plugins/if-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/if-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/if-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/if-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/if-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/if-menu/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rookie](https://wordpress.org/support/users/alriksson/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/pre-questions/#post-12001979)
 * Status: resolved