add_filter('template_include', 'remove_orderby_for_auctions', 99); function remove_orderby_for_auctions($template){ if (get_query_var('is_auction_archive', false)) { remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering' ), 10 ); } return $template; }