I'm trying to get each filter group in my search to collapse and expand on click.
The same collapse code is working in another view, but inside content template section. This has to be done inside the search and pagination section.
This is not working, nothing happens on click.
Click the red button in the right side of the browser on this page hidden link
I've inserted a test, using the link "open filter",
My end result should be expanding the search filter groups, by clicking their headlines (with an arrow at the end)
And a link if possible to change value from "open" to "close"
I've attached some images
Best regards
Lykke
Hi, customizing custom search filters is a bit outside the scope of support we offer here, but what I can tell you is that there are multiple elements on the page with the ID "collapseThis". In fact, there are 3. IDs should be unique, so that's probably the main problem here. Any time you separate a View so that the filters and results are shown in different areas of the site, the filters are actually repeated in both spots but hidden. How are the filters and results added to your site? If you are using shortcodes, then you could try using a shortcode attribute to differentiate each set of filters:
[wpv-form-view name="Your View Name" target_id="self" position="1"]
[wpv-view name="Your View Name" view_display="layout" position="2"]
Then inside the View, use the position attribute to make the IDs unique:
<a class="normallink" data-toggle="collapse" href="#collapseThis-[wpv-attribute name='position']" role="button" aria-expanded="false" aria-controls="collapseThis-[wpv-attribute name='position']">
open filter
</a>