I am trying to: Get the Sort by controls at the top of view resoults, but filter controls in sidebar in a widget
Link to a page where the issue can be seen: enlace oculto
I expected to see: Somethin like enlace oculto , but with the filter controls in sidebar (widget)
Instead, I got: The main problem is that if I update the sort controls, a duplicate of the form filter controls is generated. This causes the price slider (in addition to other jqueries) to stop working on the sidebar widget.
Any idea how I can make it work?
Sorting Controls can be added only to the Search and Pagination editor, just like Filters.
Hence, if you insert later the [wpv-filter-meta-html] separately (as a widget, in a Layout or even on a page by splitting results and search), the sort by will be part of the search.
Hence, here I suggest using HTML.
You would add a Row that uses the whole width of the sorting control, and the search itself you wrap in a column that is narrow, below the above row.
But this will not give you a nice result on narrow screens, as the Bootstrap staking will stack order by over loop over search, in this case.
Well, that gave me an idea. Append the filter controls to sidebar with jquery.
In principle it works but still needs some work to locate the sort controls where I want.
It would be easier if there was some kind of [wpv-sort-orderby-meta-html] to handle the elements more freely
Just to follow up on what Beda mentioned, we do offer some hook-in points for Views pagination and search events. You can use these hooks to perform any jQuery you want after the filters are modified, or after the results are updated, etc. You can access these event hooks in a View's Filter Editor JS panel by clicking "Frontend Events". It will generate the proper event listener scaffolding. Let me know if you have additional questions about that.