WordPress / Web Development Tutorials
(Best WordPress Tutorials)

CSSHTMLJavaScriptjQueryMySQLPHPSilvaTechnologiesWooCommerceWordpress
Silva Web Designs - Blog

How to Remove the ‘Default Sorting’ Dropdown in WooCommerce

If you have the default sorting dropdown when using the default WooCommerce functionality and want to remove it, well, you’re in the right place.

Yes, we can remove this using CSS, but the better way would be to remove it by simply adding a snippet of code to your functions.php file.

How to Remove ‘Default Sorting’ Dropdown from WooCommerce Shop & Archive Pages


/**
 * Remove 'Default Sorting' Dropdown from WooCommerce Shop & Archive Pages
 *
 */
  
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

Remove ‘Default Sorting’ Dropdown from WooCommerce in StoreFront Theme


/**
* Remove 'Default Sorting' Dropdown @ StoreFront Shop & Archive Pages
*/
  
add_action( 'wp', 'silva_remove_default_sorting_storefront' );
  
function silva_remove_default_sorting_storefront() {
   remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 );
   remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );
}

Can it be done with a plugin?

If you don’t feel confident with PHP coding, no problem, there is a plugin called StoreCustomizer that will do just the trick.

With this plugin, you can hide the ‘default sorting’ dropdown and offers a lot more than this. Essentially, it’s a plugin built for everyone who wants to fully customise their WooCommerce store without coding (e.g. edit buttons, badges, tabs, pages, stock display, checkout fields).

 

Nathan da Silva - Profile

Posted by: Nathan da Silva

Nathan is the Founder of Silva Web Designs. He is passionate about web development, website design and basically anything digital-related. His main expertise is with WordPress and various other CMS frameworks. If you need responsive design, SEO, speed optimisation or anything else in the world of digital, you can contact Silva Web Designs here; [email protected]

It’s good to share

Join the discussion

Related Posts

Related - How to Add a Custom Author Profile Page to Your WordPress Site

Wordpress / 19th December 2023

How to Add a Custom Author Profile Page to Your WordPress Site

Read More Related - 5 Best Antivirus Software for macOS 2022

Technologies / 5th July 2022

5 Best Antivirus Software for macOS 2022

Read More