Home Forums WoodMart support forum Moved: Reply To: Create a block of filters and apply to all category pages

Moved: Reply To: Create a block of filters and apply to all category pages

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #317303

    [email protected]
    Participant

    Thanks a lot. Bellow is the email I received

    #317419

    Hello,

    I have started a new topic for convenience.

    Please add this code to the functions.php of the child site.

    function woodmart_cart_count() {
    		if ( ! is_object( WC() ) || ! property_exists( WC(), 'cart' ) || ! method_exists( WC()->cart, 'get_cart_contents_count' ) ) {
    			return;
    		}
    
    		$count = WC()->cart->get_cart_contents_count();
    		?>
    			<span class="wd-cart-number<?php echo woodmart_get_old_classes( ' woodmart-cart-number' ); ?>"><?php echo esc_html( $count ); ?> <span><?php echo esc_html( _n( 'item', 'items', $count, 'woodmart' ) ); ?></span></span>
    		<?php
    	}

    We will fix this in the nearest update.

    Best Regards

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