Advanced search CPT

This topic contains 22 replies, has 4 voices, and was last updated by  Silvia Frati 5 years, 12 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #429550

    Silvia Frati
    Expired Member
    Post count: 30

    @alex the search result page is completely fine for me. I just need to change the search form + query.

    By default search form is:

    
    
    ------------------------------------------------------------
    | category |      |search term|        |nearby|
    ------------------------------------------------------------

    I managed to hide nearby using some hooks since it’s no use for my customer and just confusing. I need to replace it with a <select> whose options are those “GroupsOfTown” i was speaking of. So:

    
    
    ------------------------------------------------------------
    | category |      |search term|        |groupOfTown ↓|
                                           |group1|
                                           |group2|
                                           |group3|
                                           |more..|
    ------------------------------------------------------------

    Those “GroupOfTown” should be selectable when inserting a new “gd_place”

    #429586

    Alex Rollin
    Moderator
    Post count: 27815

    I am not sure then what the functional difference is when searching ‘nearby’ a given latlon that is near the center of the ‘groupOfTown’.

    If there isn’t a difference, perhaps a form could be built to submit that query.

    https://wpgeo.directory/supreme-directory/?geodir_search=1&stype=gd_place&s=+&snear=&sgeo_lat=37.7749295&sgeo_lon=-122.41941550000001

    where the latlon is near the center of groupOfTown1

    #429669

    Silvia Frati
    Expired Member
    Post count: 30

    @alex To make it short the functional difference is that searching ‘nearby’ would be like searching in a radius starting from the center, while searching the group would only take the group. Searching in a radius might give as result town of another group, which my customer does not want

    #429719

    Alex Rollin
    Moderator
    Post count: 27815

    I see!

    The only way I can think of to do that is a subsite for each GroupOfLocations.

    #429731

    Silvia Frati
    Expired Member
    Post count: 30

    Hmmm… what do you mean with “subsite for each GroupOfLocations”?

    #429739

    Alex Rollin
    Moderator
    Post count: 27815

    Make a new multisite for each group of cities.

    #429863

    Dirk
    Full Member
    Post count: 390

    Are you good with the concept of country – region – city?
    In the US you will have United States – Georgia – Atlanta.

    What I understand is that you want to have a multi-select for the city. The search should then an “OR” statement of the cities. Correct?
    My comment here is, that this depends on the number of your locations. If you have a huge number, all this will be loaded into the multi-select and hard to find.

    But:
    This can be done with a customization of the search or as an extension of the WP search (also customization).

    Best,
    Dirk

    #429886

    Silvia Frati
    Expired Member
    Post count: 30

    @alex sorry but i don’t understand what that would mean practically speaking.

    @Dirk I’m not good with that concept of country – region – city, this is because what i would need is instead: country – region – GroupOfTown – city.

    A multi-select for the city would be the “horrible” way to make it, because for example selecting 10 cities could be the same as select 1 GroupOfTown (which is obviously more user friendly).

    The number of “GroupOfTown” is 110 based on what Wikipedia says of my country, the number of city instead is absurd, no way i could fit it all in a standard multi-select, it would take ages to load. Would require at least AJAX search.

    What i was going to do if i cannot make it with GD directly is to hook into GD new gd_place listing form, add a custom select that reads from a custom DB table (GroupOfTowns), so that the user can first of all select one while inserting the new place, and then just search over this custom field in Advanced search giving again a select to the user to search for GroupOfTown

Viewing 8 posts - 16 through 23 (of 23 total)

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

Open Support Ticket