Skip to content

Instantly share code, notes, and snippets.

Last active July 26, 2018 14:07
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A function that modifies the default WooCommerce orderby dropdown. You can put this snippet in your functions.php file.
// Modify the default WooCommerce orderby dropdown
// Options: menu_order, popularity, rating, date, price, price-desc
// In this example I'm removing price & price-desc but you can remove any of the options
function patricks_woocommerce_catalog_orderby( $orderby ) {
return $orderby;
add_filter( "woocommerce_catalog_orderby", "patricks_woocommerce_catalog_orderby", 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment