Tell us what you are trying to do?
Hello - I'd like to be able to generate a NEW PAGE with the search results from a view.
Is there any documentation that you are following?
I watched this tutorial, but it didn't quite capture what I'm trying to do.
https://toolset.com/course-lesson/creating-a-custom-search/
Is there a similar example that we can see?
I would like the view that I have created in the sidebar of this page to generate a new page with the search results:
hidden link
What is the link to your site?
See above.
Hi,
Thank you for contacting us and I'd be happy to assist.
For this example, suppose that your view's slug is "view-slug". To show the view's search results on a different page, you can follow these steps:
1. Please create a new page and name it something like "Library Search Results".
On this new page, if you only want to show the search results, you can use the shortcode:
[wpv-view name="view-slug" view_display="layout"]
If you'd like to show the search form and the results, then the shortcode would be:
[wpv-view name="view-slug"]
2. On your existing library page, where the search form needs to be, you'll update the view's shortcode in the sidebar to:
[wpv-form-view name="view-slug" target_id="1234"]
Please replace "1234" with the actual ID of the newly created "Library Search Results" page.
As a result, when the search will be performed on the library page, the visitor will be taken to the "Library Search Results" page for the results.
regards,
Waqar
Thanks.. I'm a little confused about where to insert the line of code from step two. Here is what my search and pagination section of the view looks like. If I replace the submit button with the code you provided, the submit button just disappears.
Thanks for writing back.
The shortcode from step 2 doesn't need to be added inside the view.
It will need to be placed in the Elementor builder content that is showing the sidebar, where you need the view's search form only.
( screenshot: hidden link )