Home › Toolset Professional Support › [Resolved] HIde the map on the main Search/View page
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Tagged: Custom search, Toolset Blocks, Toolset Maps, Views plugin
Related documentation:
This topic contains 3 replies, has 2 voices.
Last updated by Waqar 1 year, 6 months ago.
Assisted by: Waqar.
Tell us what you are trying to do?
I've built out a directory for a hospital/healthcare system.
I've got a Search page here: hidden link
I've used a conditional block to 'hide' all items until after a search is performed.
I now need to hide the map until after a search is performed.
Is there any documentation that you are following?
Multiple posts in the Toolset Forums. Have watched some of the 'Lessons' as well and have not found a working solution.
Is there a similar example that we can see?
I don't think that's needed - it's pretty straightforward.
What is the link to your site?
hidden link
I've attached a screenshot of the page in the builder so you can see my current setup.
Hi,
Thank you for contacting us and I'd be happy to assist.
As your view's search is using the page refresh method to show the results, you can use the conditional block that checks for the existence of the search submit button's value in the URL.
( note that when the search is performed 'wpv_filter_submit=View+Results' URL parameter is added, along with the other ones )
You can wrap the map's block in another conditional block that has the following condition:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term )
NOT ( empty( '[wpv-search-term param='wpv_filter_submit']') )
( example screenshot attached )
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
THANK YOU!!! This was exactly what I needed and worked perfectly. I appreciate your quick and helpful response.
One other map related question:
If a search is performed and there are no results for that search - it shows a map of the African coast. Is there a way to hide map as well when they are no items in the search results?
Thank you!
New threads created by Waqar and linked to this one are listed below:
https://toolset.com/forums/topic/split-hide-the-map-when-no-results-are-found/
Thanks for the update and glad that my message helped.
I've created a separate ticket for your new question and will follow-up on that shortly.
( ref: https://toolset.com/forums/topic/split-hide-the-map-when-no-results-are-found/ )
You're welcome to mark this ticket as resolved and start a new one for each new question or concern.