Forum: F.A.Q

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

Searching by town not working

Home Forums F.A.Q Searching by town not working

This topic contains 3 replies, has 2 voices, and was last updated by  Eyal Fitoussi 6 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34017

    sung
    Participant

    I have a site with locations only in New York state. The site needs to show results with just the town name in the address field. It seems to not work on some town names. One example is Huntington. When you search for Huntington, there are no results. Huntington Station is a different town and it does show results when you search for it. When I tried Huntington NY, it shows results. How can I make it work with just the term Huntington?

    #34020

    Eyal Fitoussi
    Keymaster

    It will not work because many town or city names exist in different stats or countries. Huntington exists in Indiana , West Virginia and I am pretty sure in few other places. So when searching Huntington only google API doesn’t know which one you are referring to and probably looking for the other than the one in new york. To test it search for Huntington in a radius of 1000 miles or even more and see which one google actually geocode.
    To overcome that you can go in the shortcode.php file and look for the address before being geocode and add “new York” to it.
    Ex. You should search for $_GET[org_address] just before it is being geocoded and change it to $_GET[org_address] . ‘New York’

    #34019

    sung
    Participant

    Thanks

    #34018

    Eyal Fitoussi
    Keymaster

    You are welcome. did you get it to work?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.