Title: Default County Setup
Last modified: July 8, 2024

---

# Default County Setup

 *  Resolved [phpteam](https://wordpress.org/support/users/phpteam/)
 * (@phpteam)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/default-county-setup/)
 * How can we show the default country based in IP?

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

 *  Thread Starter [phpteam](https://wordpress.org/support/users/phpteam/)
 * (@phpteam)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17877635)
 * We checked ‘Enable Auto Country Select’ but still this is not working. United
   states is always shown as default country. Please help. Thanks.
 *  [mcprime](https://wordpress.org/support/users/mcprime/)
 * (@mcprime)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17879885)
 * Same thing happened to me. I checked the API used for geolocation and the API
   response is limited.
   So I changed the API url used for geolocation and adjusted
   variable used in the plugin file.Here’s how to do it:1. Go to Plugin editor and
   select Country & Phone Field Contact Form 7 plugin2. Go to file /includes/include-
   js-css.php3. Near line 138, comment the url and add new geolocation API url so
   it will be something like//url: “[https://reallyfreegeoip.org/json/&#8221](https://reallyfreegeoip.org/json/&#8221);,
   url: “[https://freeipapi.com/api/json/&#8221](https://freeipapi.com/api/json/&#8221);,
   4. Near line 140 in success callback, add adjusting variable so it will be something
   likesuccess: function(response){response.country_code = response.countryCode.
   toLowerCase();5. Done. You can test again
 * So in this case we only change added two line of code total. Hope this helps
 *  Thread Starter [phpteam](https://wordpress.org/support/users/phpteam/)
 * (@phpteam)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17882377)
 * Thanks. We will check.
 *  Plugin Author [Narinder Singh](https://wordpress.org/support/users/narinderbisht/)
 * (@narinderbisht)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17918571)
 * Hello [@phpteam](https://wordpress.org/support/users/phpteam/) ,
   The IP tracking
   API is working fine. Kindly share your webpage URL. I will try to check the issue.
   If everything working fine. Kindly share your valuable reviews.RegardsNarinder.
 *  Plugin Author [Narinder Singh](https://wordpress.org/support/users/narinderbisht/)
 * (@narinderbisht)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17959912)
 * [@phpteam](https://wordpress.org/support/users/phpteam/) 
   I did find any response
   on this thread, so I am mark it resolved.Thank you.

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

The topic ‘Default County Setup’ is closed to new replies.

 * ![](https://ps.w.org/country-phone-field-contact-form-7/assets/icon-256x256.png?
   rev=2064274)
 * [Country & Phone Field Contact Form 7](https://wordpress.org/plugins/country-phone-field-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/country-phone-field-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/country-phone-field-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/country-phone-field-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/country-phone-field-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/country-phone-field-contact-form-7/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Narinder Singh](https://wordpress.org/support/users/narinderbisht/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/default-county-setup/#post-17959912)
 * Status: resolved