I have a view on my directory page that includes a search. I would like to also have some search functionality on the home page that takes you to the same directory page for the results. BUT I don't want the same search layout on each page.
Is there any documentation that you are following?
On this site there is a simple search in the home page header: hidden link that then takes you to the more full-featured search page: hidden link
I can't see how to do this with Toolset because I think I would have to have the same search fields o both pages? I have thought about just hiding some search/filter fields with CSS on the home page but it means having them in specific places on the main search that doesn't really work.
What is the link to your site?
Directory page: hidden link
I want to keep the search area on this page as it is and in the home page banner just have the following laid out in a row:
Search by location Search by region Capacity Search Now (image attached)
And it take people to the above directory page for the results.
Ok - in that case, you should try to add conditional block.
First navigate to: Toolset => Settings => Front-end Content tab and add the is_front_page function name within section "Functions inside conditional evaluations".
Once you register the function name is_front_page, edit your view where you added custom search filters and then add the conditional block and select "Custom function" and further select is_front_page function name and compare with static value 1 and add the condition. Please check the following screenshot:
- hidden link
Now within this conditional blocks add the filters you want to display when home page is displayed.
Add another conditional block and check when home page is static value 0 and add other search filters you would like to have.
Secondly, I tried to do it on a test page using the block editor here: hidden link
I can specify show search only but when I select 'display the results on another page' it does not allow me to select the 'our venues' page where the original view is.
Can you please share details what view you want to use and where you added those conditional statements I mentioned and what you want to display with home page and on what page you want to display different search filters with results.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Yes, the search filters turn off the fields I don't want on the home page.
So I do want to display Regions (labelled Search by region), Locations (labelled Search by location), Search Capacity (labelled Capacity) and the Submit button.