Home Forums Basel support forum Remove brackets around “Filter by attributes” widget count

Remove brackets around “Filter by attributes” widget count

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #145308

    Al
    Participant

    hi
    How to Remove brackets around “Filter by attributes” widget count?
    Regards

    Attachments:
    You must be logged in to view attached files.
    #145487

    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

    #145524

    Al
    Participant

    Doesnt work

    #145775

    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

    #145910

    Al
    Participant

    hi, ok thanks
    regards

    #145974

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

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

The topic ‘Remove brackets around “Filter by attributes” widget count’ is closed to new replies.