on the home page how to display the search box to put the address
and to display below the related agencies and if possible, also, the consultants linked to these agencies
Thank you very much for your help
Kind regards
Marie
Here is how I would set up the homepage:
- Create a new View and choose "Full custom display" in the popup dialog.
- In the Content Selection area, choose "Agencies"
- Skip down to the Search and Pagination editor and click "New Filter" then "Distance". Fill in the criteria for filtering by address from the User's location. See our documentation here for more information: https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance
- Use the Loop Wizard button to create an unformatted loop. Insert the post link shortcode in the loop for testing purposes
- Save the View and edit the home page. Insert the View using the Fields and Views button, or copy and paste the View shortcode from another area.
- You should be able to use the distance filter now on the front-end of the site.
- Edit the View to add a map, map markers, and other content to the list of results.
- You can display information from related posts using the "Post selection" tab in any field popup dialog. I'm attaching a screenshot here. You can learn more about displaying information from related posts here: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
Let me know if you have questions about this process.
Maybe there was a misunderstanding here. What we would like to do is not to use the "user location" but for the user to input manually his address and to get as a result the closest agencies & consultants.
I am starting to have a doubt if this is possible with toolset at all, that would be a big issue for us.
I succeded in creating a page with a search field which will update the map based on the adress the user will put in the field, and will display the closest marker. My last concern is : I would like the map and the loop not to be executed automatically after the load of the page (I don't want a google map on my homepage, I just want the search field) and when the user will ask for a search, the google map may appear. Thank you for your help
I don't want a google map on my homepage, I just want the search field
When you use the Fields and Views button to insert the View shortcode, you can choose "Only the search form". See the attached screenshot. Then you can place the search results on a separate page, with or without the same search filter controls.
If you want the search results on the same page without going to a new URL, this requires custom code. I can help with this code if you show me the View on your site. I need to be able to see all the search filters and how they work together.