Skip Navigation

[Resuelto] Sort By and filter controls in different locations

This support ticket is created hace 5 años, 12 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Etiquetado: ,

This topic contains 3 respuestas, has 3 mensajes.

Last updated by Christian Cox hace 5 años, 12 meses.

Assisted by: Christian Cox.

Autor
Mensajes
#753863
2018-04-27_1802.png
2018-04-27_1758_001.png
2018-04-27_1758.png
2018-04-27_1757.png

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: hidden link

I expected to see: Somethin like hidden link , 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?

#757001

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.

#759652

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

#763134

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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.