Tagged: woocommerce
-
AuthorPosts
-
July 8, 2024 at 4:40 pm #1461617
I’m trying to remove the sorting in a webshop.
I already added this in funcions.php:
/* WooCommerce sorteeropties verwijderen */
remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_catalog_ordering’, 30 );
This didn’t work.
Then I added this in an Snippets plugin. That didn’t work either.
What I want is to remove both dropdowns.
Can you help me?July 9, 2024 at 5:43 am #1461649Hey Maureen,
Thank you for the inquiry.
To disable the product sorting, please add this filter in the functions.php file:
add_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_frontend_search_params', 20 );
Best regards,
IsmaelJuly 26, 2024 at 4:10 pm #1463069I was curious about this too, but this did not appear to work. Further, I have asked in another thread if these elements can be moved to bottom of pages. Thanks.
July 27, 2024 at 9:17 pm #1463129Hi,
To remove the sorting try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function remove_avia_woocommerce_frontend_search_params() { remove_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_frontend_search_params', 20 ); } add_action( 'wp_loaded', 'remove_avia_woocommerce_frontend_search_params' ); if ( ! function_exists( 'avia_woocommerce_frontend_search_params' ) ) { function avia_woocommerce_frontend_search_params() { } }
To move the sorting to the bottom of the page, try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function modify_avia_woocommerce_frontend_search_params_hook() { remove_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_frontend_search_params', 20 ); add_action( 'woocommerce_after_shop_loop', 'avia_woocommerce_frontend_search_params', 20 ); } add_action( 'wp_loaded', 'modify_avia_woocommerce_frontend_search_params_hook' );
Best regards,
MikeAugust 29, 2024 at 10:08 am #1465658Thank you, Mike, it works!
August 29, 2024 at 5:15 pm #1465682 -
AuthorPosts
- You must be logged in to reply to this topic.