Advanced search location as dropdown

This topic contains 4 replies, has 3 voices, and was last updated by  Paolo 5 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #441694

    Ann
    Full Member
    Post count: 84

    Users who tested our new website say that the autocomplete field for typing the location is cumbersome especially when accessed via mobile device. They are requesting this to be a dropdown field. Is this possible? I can code. I just need a pointer on the best way to modify as I have limited time digging thru the files. Thanks.

    #441695

    Ann
    Full Member
    Post count: 84

    Or if there is a way for me to insert custom php in between the default search fields?

    #441709

    Alex Rollin
    Moderator
    Post count: 27815

    Hi Ann,

    There isn’t a setting to switch that to a dropdown.

    There is another feature called the Location Switcher that does work like that.

    https://wpgeodirectory.com/docs/multilocations/#main

    #441710

    Alex Rollin
    Moderator
    Post count: 27815

    About the search, you could try customizing the search widget:
    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    #441725

    Paolo
    Site Admin
    Post count: 31206

    Hi Ann,

    if you have a limited number of locations, a work around could be:

    1 Create a select custom field called “searchlocation” (or whatever you like), add your locations as options and don’t make it appear anywhere in front end.
    2 Hide it with CSS in the add listing form too.
    3 Manually edit 1 listing.
    4 Export current listings via CSV, edit them to add the location to our custom field and re-import to edit them
    5 Write a wee jQuery script for the add listing form to populate that field copying the location from the city field.
    6 use that Custom Field as a select option in the advance search filters.

    This should be simpler and more effective that editing php files.

    Let us know how it goes,

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket