Advanced search CPT
This topic contains 22 replies, has 4 voices, and was last updated by Silvia Frati 6 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: advanced search, CPT, localization, region, search
-
AuthorPosts
-
May 8, 2018 at 3:04 pm #429550
@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”
May 8, 2018 at 7:48 pm #429586I 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.
where the latlon is near the center of groupOfTown1
May 9, 2018 at 7:47 am #429669@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
May 9, 2018 at 1:15 pm #429719I see!
The only way I can think of to do that is a subsite for each GroupOfLocations.
May 9, 2018 at 2:16 pm #429731Hmmm… what do you mean with “subsite for each GroupOfLocations”?
May 9, 2018 at 3:01 pm #429739Make a new multisite for each group of cities.
May 10, 2018 at 7:36 am #429863Are 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,
DirkMay 10, 2018 at 10:02 am #429886@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
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket