Hi, i've created a view which works on hidden link but when i've moved it over to a newer version of the site which we are building using elemontor and types, the filters on the right no longer work and I can't seem to figure out why so was hoping you could help
you can see the page at: hidden link by logging in using, username: Elementor and password: Vp4LE%YqpkxbQEMW8g%zHxfk
cheers
Hi Andy,
Thank you for contacting us and I'll be happy to assist.
Looking into your view ("Hops View"), I noticed that it is set to show "Products", but no search filters are set in it.
This is the reason why the results are not being filtered when parameters from the sidebar ( e.g. filter_country=uk ) are passed to it.
To make this work, you'll first enable the "Search and Pagination" section on the views edit screen, from the top right drawer "Screen Options".
Once enabled, you can add a filter for each of the options available in the sidebar, making sure that the URL parameter matches.
We have a useful guide on the topic at:
https://toolset.com/documentation/user-guides/front-page-filters/
I hope this helps! Please let us know if you need any further assistance.
regards,
Waqar
Great thanks that makes sense as it's using the view differently to how it was on the old site due to elementor, how do i add a text search? ive clicked the text search button but there doesn't appear to be an option to edit the parameter so that it matches the s= in the widget?
Hi Andy,
Thanks for writing back.
By default, the Views plugin uses "wpv_post_search" parameter for the text search field.
You can remove the "Products Seach" widget from the sidebar and instead add the following custom HTML code for the search form in a regular "Custom HTML" widget:
<form role="search" method="get" class="woocommerce-product-search" action="">
<label class="screen-reader-text" for="woocommerce-product-search-field">Search for:</label>
<input type="search" id="woocommerce-product-search-field" class="search-field" placeholder="Search products…" value="" name="wpv_post_search">
<button type="submit" value="Search">Search</button>
<input type="hidden" name="post_type" value="product">
</form>
This new search form will not only connect with the view's text search filter but will also show the results on the same page.
(unlike the "Products Seach" widget, which shows the results on the homepage).
Please let me know how it goes and if you have any further information or questions.
regards,
Waqar