Skip Navigation

[Resolved] Home page filter search by city/state

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by annaA-2 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1966869

Hi,
I would like to add a search field for property on the home page without map (like airbnb homepage)

I would like to search by city by recalling the city from the address field filled in by the owner and linked to the map.

For example, if a user searches for a city (Rome) the system automatically finds Rome Italy.

After when the user clicks on the search button the result should be shown on a second page that I have already created with the accommodations and the map.

How should I proceed with Toolset?

Thanks, best.

Anna

#1967241

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anna,

Thank you for getting in touch.

You can do this by making use of the Distance Filter.
https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

Following the instructions above should allow you to successfully implement this.

If there are any issue please let me know, if not then you can go ahead and mark this issue as resolved.

Thanks,
Shane

#1967863
at2.jpg
at1.png

Hi Shane,
thanks for reply. I've followed your tips but I can't reach the goal.
I've created an hompage with a filter by distance but I need something different like attached image (without map results on this page).

After I push submit button the search should go to another page (se attachment 2) where I can see the result of the summary search (structure on the left and maps on the righ)and add the filter search.

Could you help me please?

Best Anna

#1968213

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anna,

In order to remove these additional fields you will need to hide them with CSS, however remember this is a Distance filter and not a filter to filter the posts by address.

We are able to hide some of the fields elements but not all. For instance you wont be able to hide the text "Show Results Within".

To hide the fields add this css to your view.


#toolset-maps-distance-value{
display: none;
}
#toolset-maps-distance{
display:none;
}

In order to setup the search on one page and the results on another you are going to need at least 1 more page. One for the dedicated search given that this current page has the entire view..

Follow the instructions below:
1. Create a search page then insert your view.
2. When inserting the view, you will see the options in the right sidebar "Both the search form and results Only the search form Only the search results."
3. Select only the search form. Then select "on another page"
4. Search for the page that you've already setup the view on.
5. Finally just save your search page post.

Once you've done this your search form will link to the results page that you currently have.

Please let me know if these instructions were clear.
Thanks,
Shane

#1969003
error.png

Hi Shane,
thanks for support alway fast and accurate.
I'm trying to follow your instruction but really I don't see the: "...options in the right sidebar "Both the search form and results Only the search form Only the search results."".
I've attached a print screen to show you how I can see, please could you tell me where I'm wrong?
I've selected the View but on the right bar I can only see "Custom search" different option.
Thank you for your help.
Best,

Anna.

#1970725

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

search.PNG

Hi Anna,

From your screenshot i'm seeing where you are working on the view on the current page that it was created on.

What you need to do is to create a new page and insert this view, however before clicking on Edit Original or Edit as Copy you will see the option to insert the search on in the Blocks sidebar, see my screenshot

This option will show immediately after inserting the block view into the page.

Please let me know if you're still not able to see this option.

Thanks,
Shane

#1972583

My issue is resolved now. Thank you!