title: Removing the shopping cart from the menu from child theme functions.php
body: <p>I am trying to remove the shopping cart from the parents theme via the child theme's functions.php file. I could easily remove it from the parent's functions.php but we all know that is a no-no. Besides, the option to put it back should be available in the future. Unfortunately, the parent theme MAXSTORE was customized so a generic remove from woocommerce doesn't work. I have to hack the functions in MAXSTORE parent. But, I am not really that good at this. Can anyone show me how to do this?</p>
  
  <p>p.s. Don't worry about the wishlist part. The theme config had a handy dandy checkbox to control its visibility ;)</p>
  
  <p>Here is the function in question from the parent functions.php</p>
  
  <pre><code>////////////////////////////////////////////////////////////////////
  // WooCommerce header cart
  ////////////////////////////////////////////////////////////////////
  if ( !function_exists( 'maxstore_cart_link' ) ) {
  
      function maxstore_cart_link() {
          ?&gt;  
          &lt;a class="cart-contents text-right" href="&lt;?php echo esc_url( WC()-&gt;cart-&gt;get_cart_url() ); ?&gt;" title="&lt;?php _e( 'View your shopping cart', 'maxstore' ); ?&gt;"&gt;
              &lt;i class="fa fa-shopping-cart"&gt;
                  &lt;span class="count"&gt;&lt;?php echo WC()-&gt;cart-&gt;get_cart_contents_count(); ?&gt;&lt;/span&gt;
              &lt;/i&gt;
              &lt;span class="amount-title hidden-sm hidden-xs"&gt;&lt;?php echo _e( 'Cart ', 'maxstore' ); ?&gt;&lt;/span&gt;
              &lt;span class="amount-cart"&gt;&lt;?php echo wp_kses_data( WC()-&gt;cart-&gt;get_cart_subtotal() ); ?&gt;&lt;/span&gt; 
          &lt;/a&gt;
          &lt;?php
      }
  
  }
  if ( !function_exists( 'maxstore_head_wishlist' ) ) {
  
      function maxstore_head_wishlist() {
          if ( function_exists( 'YITH_WCWL' ) ) {
              $wishlist_url = YITH_WCWL()-&gt;get_wishlist_url();
              ?&gt;
              &lt;div class="top-wishlist text-right"&gt;
                  &lt;a href="&lt;?php echo esc_url( $wishlist_url ); ?&gt;" title="Wishlist" data-toggle="tooltip"&gt;
                      &lt;i class="fa fa-heart"&gt;&lt;div class="count"&gt;&lt;span&gt;&lt;?php echo yith_wcwl_count_products(); ?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/i&gt;
                  &lt;/a&gt;
              &lt;/div&gt;
              &lt;?php
          }
      }
  
  }
  add_action( 'wp_ajax_yith_wcwl_update_single_product_list', 'maxstore_head_wishlist' );
  add_action( 'wp_ajax_nopriv_yith_wcwl_update_single_product_list', 'maxstore_head_wishlist' );
  
  if ( !function_exists( 'maxstore_header_cart' ) ) {
  
      function maxstore_header_cart() {
          ?&gt;
          &lt;div class="header-cart-inner"&gt;
              &lt;?php maxstore_cart_link(); ?&gt;
              &lt;ul class="site-header-cart menu list-unstyled"&gt;
                  &lt;li&gt;
                      &lt;?php the_widget( 'WC_Widget_Cart', 'title=' ); ?&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;?php
          if ( get_theme_mod( 'wishlist-top-icon', 0 ) != 0 ) {
              echo maxstore_head_wishlist();
          }
          ?&gt;
          &lt;?php
      }
  
  }
  if ( !function_exists( 'maxstore_header_add_to_cart_fragment' ) ) {
      add_filter( 'woocommerce_add_to_cart_fragments', 'maxstore_header_add_to_cart_fragment' );
  
      function maxstore_header_add_to_cart_fragment( $fragments ) {
          ob_start();
  
          maxstore_cart_link();
  
          $fragments[ 'a.cart-contents' ] = ob_get_clean();
  
          return $fragments;
      }
  
  }
  ////////////////////////////////////////////////////////////////////
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Being the front-end developer that I am, I managed to do it with CSS. A good solution, but not what I want and not what I asked so I won't answer my own question, instead I'll post it here for others to consider it</p>
  
  <pre><code>li#wpmenucartli {
     display: none;  //hides the menu cart list item
  }
  
  .navbar-inverse .navbar-nav &gt; li:nth-last-child(2) &gt; a:after {
     content: '';   //gets rid of the trailing dash on the second to last list item to pretend it is the actual last item
     border-right:none;  //if you have a border, this does the same as above
  }
  </code></pre>
  
  <p>Thank you in advance</p>