title: Wishlist item counter in top bar menu of website (YITH Wishlist/WooCommerce)
body: <p>I want to add an item counter to the wishlist page link in the top bar menu of my site. I tried adding and using a shortcode, but the counter still does not show up in the menu link - instead of the menu link being <code>Wishlist X</code> (where X is the number of items in the wishlist), it's only displayed as <code>Wishlist</code>. Could someone please help me add an item counter to the link? Thanks in advance! </p>
  <p>The code I’m currently using in my <code>functions.php</code> of my child theme:</p>
  <pre><code>function tnc_wishlist_counter_cart(){
      global $woocommerce;
      $wl_items = YITH_WCWL()-&gt;get_products();
      $count = 0;
      foreach ($wl_items as $key =&gt; $item) {
          $count = $count + 1;
      }
      return $count;
  }
  add_shortcode( 'tnc-wishlist-counter', 'tnc_wishlist_counter_cart' );
  </code></pre>
  <p>In the Navigation Label of the top menu item, I have added this: <br/>
  <code>Wishlist &lt;?php echo do_shortcode('[tnc-wishlist-counter]'); ?&gt;</code></p>