GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Not resolved]Get only one country in google geocode autocomplete

Forums Support Get only one country in google geocode autocomplete

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #55914
    scorman
    Member

    Hello,

    I’d like to limit the autocomplete from google in the search from to one country (Belgium). How can I do ?
    I’m using GeoMyWP for my custom post.

    And, Is it possible to change the placeholder text via functions.php ?

    Thank you !!

    #55915
    scorman
    Member

    Maybe via functions.php or javascript ?

    #55919

    Hello Scorman,
    It is not possible to modify the autocomplete options via the functions.php file in this version ( will be possible in version 3.0 of the plugin ). Right now you can only do this by modifying the JavaScript file.

    If you think you can edit the file I can guide you on what and where to change the code.

    #55924
    scorman
    Member

    =yes, if you tell me, I can edit the javascript. thank you !

    #56051
    scorman
    Member

    Can you tell me how do it please ?

    #56052
    scorman
    Member

    Oh, I find this to add in the JS file:

    It works, but if I take the city “Halle”, the search says “No results”.

    But if I search “Halle, Belgium”, then I get my results.

    Any idea what’s the problem ?

    Is there a way to add the country name behind the autocomplete ?

    #56062

    Hello Scorman,
    I apologize for missing track on this ticket.

    What you described most likely happens because the city “Halle” exists in other countries as well. If that is the case then Google API probably geocodes the “Halle” that is in a different country rather than Belgium. That is way you get no results.

    There is not much to do about this at the moment ( except for messing with more core files ).

    I am at the final stage of GEO my WP version 3.0 and should have a first beta very soon. Version 3.0 has many new filters that you might be able to use to overcome this issue. If it doesn’t, I will make sure to add a filter that will help with it.

    If you get to test the beta version once it released, let me know and I will try to guide you with this issue.

    Kind regards,
    Eyal

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

You must be logged in to reply to this topic.