Sorting panels

TheCartPress provides three ways to display a sorting panel:

The easiest way is to add the TCP Sort Panel widget to a widgetable area.

The second way is to add the tcp_the_sort_panel() function to the products template.

You could take a look to the thecartpress/theme-templates/loop-tcp-grid.php to see an example of how to integrate this function in a template.

And, finally, if the theme uses the loop-tcp-grid.php set the ‘See sorting panel’ setting in the ‘Loop Settings’.

The Using TCP Loops doc explains how to add the tcp_loop_grid in your theme. This grid layout has the sorting panel added and it can be displayed through the Loop Settings admin panel.

To modify the tcp_loop-grid settings you need to visit TheCartPress Settings / Theme compatibility and activate ‘Use TCP Loops Configurables’. After this, TheCartPress shows a new admin menu called ‘Loop Settings’. In this new panel you could show or hide the sorting panel.

Activate the TCP Loops menu

For Plugins Developers, please visit how to add sorting methods