Home Contact Us Payments SC Commerce SC Commerce Docs SC Commerce Snippets

Simply Computing

We make websites. Simple.

Remove ordering dropdown box from category page

If you only have a few products on each category page, the ordering dropdown box can be removed to give a less cluttered look. You can set the default ordering with theĀ order by date, price or title code snippet.

 * Remove ordering dropdown box on category page

add_action('init', 'scc_remove_ordering_dropdown_box');

function scs_remove_ordering_dropdown_box() {

  remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);

   View Raw Code ID: 91129