Thanks, @yitwail, that one worked for me!
@rynald0s
thanks for the code, it works!
but it doesn’t work for mobile?
refinings from @yitwail for to remove from after loop as well:
add_action( 'before_woocommerce_init', function() {
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); // when using storefront replace 30 with 10
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 30 ); // when using storefront replace 30 with 10
} );
Hi,
that simple CSS code
.woocommerce-ordering {
display: none;
}
shown previously hides the sorting dropdown menu for me but unfortunately not sorting results display: ‘Showing all x results‘.
Additional CSS for hiding sorting results display, too?
-
This reply was modified 2 years, 11 months ago by
ajaaskel.
I cant´t get this on Storefront+Boutique. I want to get rid of the “Sort by” block at the bottom of the page, and I tried with many different suggestions, with no luck.
By the way, I want to remove the pagination block, at the top! hehehe
Any ideas on how to make it work by a code snippet??
Thanks in advance!
-
This reply was modified 2 years, 7 months ago by
speedbit.
Thanks! This worked for me.
Kriesi Enfold Theme
Add the following to your enfold-child functions.php file
add_action( 'before_woocommerce_init', function() {
remove_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_frontend_search_params', 20 );
} );
Yitwail’s suggestion:
add_action( 'before_woocommerce_init', function() {
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
} );
worked for me in Divi theme.
Thanks.
-
This reply was modified 2 years, 4 months ago by
nebuar.
-
This reply was modified 2 years, 4 months ago by
nebuar.
If you’re using storefront you’ll need to adjust the actions that it adds after the theme is setup. Use the below to remove the entire section.
See storefront/inc/woocommerce/storefront-woocommerce-template-hooks.php for more info.
add_action('after_setup_theme', 'remove_actions', 10);
function remove_actions(){
remove_action( 'woocommerce_before_shop_loop', 'storefront_sorting_wrapper', 9 );
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
remove_action( 'woocommerce_before_shop_loop', 'storefront_woocommerce_pagination', 30 );
remove_action( 'woocommerce_before_shop_loop', 'storefront_sorting_wrapper_close', 31 );
}