Home Forums Basel support forum Remove sort by Average Rating

Remove sort by Average Rating

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #138596

    Jokaras
    Participant

    Hello. How can I remove the sort by “Average Rating” from the filter?

    #138633

    Hello,

    Thank you very much for choosing our theme and for contacting us.

    HTML structure does not allow solving it by custom CSS. Such modification requires complicated Woocommerce code customization which is not covered by our support.

    Best Regards

    #138831

    Jokaras
    Participant

    But the widget you are using for this purpose is Basel Woocommerce Sort By. Isn’t this a custom-made widget by your team?
    The php code below works in another theme I use but not in yours:

    function my_woocommerce_catalog_orderby( $orderby ) {
    	
    	unset($orderby["popularity"]);	// Remove "Sort by popularity"
    	unset($orderby["rating"]);		// Remove "Sort by average rating"
    	unset($orderby["date"]);		// Remove "Sort by newness"
    	return $orderby;
    }
    add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20 );

    Can’t you at least tell me what function name should I use?

    #138853

    Hello,

    Please provide the screen and page URL of the sorting you mean. The widget can be removed in Appearance > Widgets > Shop page widget area.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)