Remove brackets around “Filter by attributes” widget count
-

AlParticipant
hi
How to Remove brackets around “Filter by attributes” widget count?
Regards
Attachments:
You must be
logged in to view attached files.
Hello,
Please add this code to the functions.php of the child theme:
add_filter( 'woocommerce_layered_nav_count', function( $text, $count ) {
return '<span class="count">' . absint( $count ) . '</span>';
}, 10, 2 );
Best Regards

AlParticipant
Hello,
Add this line to the child theme:
add_filter( 'woodmart_layered_nav_count', function( $text, $count ) {
return '<span class="count">' . absint( $count ) . '</span>';
}, 10, 2 );
Then find the file:
basel/inc/widgets/class-widget-layered-nav.php
Find this line:
echo ' <span class="count">(' . absint( $count ) . ')</span></li>';
and replace with this one:
echo ' <span class="count">' . absint( $count ) . '</span></li>';
Best Regards

AlParticipant
You are welcome! If you have any questions please feel free to contact us.
Best Regards
The topic ‘Remove brackets around “Filter by attributes” widget count’ is closed to new replies.