You can the cart count to menu item without any plugins using the following code (add to your child theme’s functions.php file):
/**
* Add the cart quantity to cart link in header menu
*/
function franz_child_cart_quantity( $item_output, $item, $depth, $args ){
$item_classes = get_post_meta( $item->ID, '_menu_item_classes', true );
if ( ! in_array( 'your-menu-item-class', $item_classes ) ) return $item_output;
$cart_count = WC()->cart->get_cart_contents_count();
if ( $cart_count > 0 ) $item_output = preg_replace( '/(<a\s[^>]*[^>]*>)(.*)(<\/a>)/siU', '$1$2 <span class="cart-count">' . $cart_count . '</span>$3', $item_output );
return $item_output;
}
add_filter( 'walker_nav_menu_start_el', 'franz_child_cart_quantity', 20, 4 );
Replace your-menu-item-class
in the code above with any class you assign to the menu item where the cart count should appear.