Skip to content

Posted in: Frontend Snippets | View All

Important: Snippet Placement

Custom sorting options (asc/desc)

This example code shows how you can add an order option for ‘random’, but this also works in similar ways for other ways to order your products on the catalog page. To learn more about the default ‘orderby’ options please see the WordPress Codex Class Reference. This code disables orderby and order in shortcodes. So if you need to use shortcodes using those two items, modify your code using the comment below the code shown here.

Audit History

Passed | February 1, 2023 | By jcullen

Scroll To Top