Title: Menu Cart Link Problem
Last modified: August 21, 2016

---

# Menu Cart Link Problem

 *  Resolved [golfer300](https://wordpress.org/support/users/golfer300/)
 * (@golfer300)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/)
 * My site is codingmadesimple.com though it is currently under maintenance mode.
   The menu cart seems to link (when clicked with no products inside) to codingmadesimple.
   com/courses even though I deleted the original Courses page and am using a Product
   Category (courses) instead for that page. How can I update the link from codingmadesimple.
   com/courses to codingmadesimple.com/product-category/courses/
    Any help is much
   appreciated.
 * [http://wordpress.org/plugins/woocommerce-menu-bar-cart/](http://wordpress.org/plugins/woocommerce-menu-bar-cart/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/menu-cart-link-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/menu-cart-link-problem/page/2/?output_format=md)

 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984031)
 * Hi there!
 * Are you using the paid version? If so we’ve implemented filters that will allow
   you to manually set that. If not, we’ll be adding it to the current version in
   the next couple of weeks. Please advise!
 * Jeremiah
 *  Thread Starter [golfer300](https://wordpress.org/support/users/golfer300/)
 * (@golfer300)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984033)
 * I am currently not using the paid version though I am going to upgrade once I
   increase cash flow. Is there anything I can do in the mean time or should I look
   for a way to adapt for the next couple weeks?
 *  Thread Starter [golfer300](https://wordpress.org/support/users/golfer300/)
 * (@golfer300)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984034)
 * Sorry double post
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984050)
 * Actually, I forgot that you shouldn’t need any filters for this. Our plugin grabs
   whatever page is set as your “shop base page”. If you go into WooCommerce Settings-
   > Pages make sure you set the “Shop Base Page” to the page you want the plugin
   to point to.
 * Otherwise, we can do a temporary fix and then when we update to the latest version
   you’ll have to change it but it’ll be easy.
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984175)
 * Hi golfer! Since I haven’t heard anything I assume you got this figured out. 
   Let me know if you need any more help!
 *  [superflymarketing](https://wordpress.org/support/users/superflymarketing/)
 * (@superflymarketing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984185)
 * Hi Jeremiah,
 * Has this version been upgraded so you can change the link when there is nothing
   in the cart?
 * Tried changing the base page, but I want it to actually link to a page that has
   nothing to do with the shop!
 * Please advise.
 * Cheers,
 * Nick
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984186)
 * Yep, it has been! Although, you’ll need to download that version from here: [http://wordpress.org/plugins/wp-menu-cart/](http://wordpress.org/plugins/wp-menu-cart/)
   or search for **wp menu cart** in your add plugin menu to find it. Delete WooCommerce
   Menu Cart before activating WP Menu Cart.
 * Are you familiar with filters? Actually, even if you’re not, it doesn’t really
   matter i guess. 😉 Take the below code and add it to your theme’s functions.php
   file:
 *     ```
       /**
        * Set page url when cart is empty
        */
       //add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
       function add_wpmenucart_emptyurl ($empty_url) {
       	$empty_url = 'https://yoursite.com/empty';
       	return $empty_url;
       }
       ```
   
 * Just change $empty_url to be the url that you want. Does that all make sense?
 *  [superflymarketing](https://wordpress.org/support/users/superflymarketing/)
 * (@superflymarketing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984187)
 * Thanks so much for your help Jeremiah, but that didn’t work. 🙁
 * [http://shop.jameslegal.co.uk/](http://shop.jameslegal.co.uk/)
 * Cheers!
 * Nick
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984188)
 * I think I know why. The add_filter function is commented out in the example I
   gave you. Try the following:
 *     ```
       /**
        * Set page url when cart is empty
        */
       add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
       function add_wpmenucart_emptyurl ($empty_url) {
       	$empty_url = 'https://yoursite.com/empty';
       	return $empty_url;
       }
       ```
   
 *  [superflymarketing](https://wordpress.org/support/users/superflymarketing/)
 * (@superflymarketing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984189)
 * This worked!
 * What a hero!
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984190)
 * Great, glad to hear it! Enjoy. 🙂
 *  [superflymarketing](https://wordpress.org/support/users/superflymarketing/)
 * (@superflymarketing)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984197)
 * Hi guys,
 * Love the plugin, great idea!
 * My menu cart seems to timeout and not work when you click on it with 0 products
   in the cart.
 * [http://shop.jameslegal.co.uk/](http://shop.jameslegal.co.uk/)
 * Any idea why?
 * Cheers,
 * Nick
 *  Plugin Contributor [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984198)
 * Hi Nick,
 * Looks like your site isn’t https, but you’re directing users to https. Just change
   the link in the function above to be [http://shop.jameslegal.co.uk/cart/](http://shop.jameslegal.co.uk/cart/)
 *  [sharongraylac](https://wordpress.org/support/users/sharongraylac/)
 * (@sharongraylac)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984204)
 * Hello there,
 * I’m also having issues with the link (unless I’m misunderstanding something)…
 * Right now, when there is nothing in the cart, if I click on the icon, it takes
   me to my Shop page. I was hoping if someone clicked on the cart icon, it would
   go to my cart page (even if it’s empty). Is this possible?
 * Thanks!
    Sharon
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/#post-3984205)
 * Sure! You just need WP Menu Cart instead of WooCommerce Menu Cart.
 * Put the following snippet in your functions.php (make sure you don’t put it after
   any `?>` at the end of the file)
 *     ```
       /**
        * Set page url when cart is empty
        */
       add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
       function add_wpmenucart_emptyurl ($empty_url) {
       	global $woocommerce;
       	$empty_url = $woocommerce->cart->get_cart_url();
       	return $empty_url;
       }
       ```
   

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/menu-cart-link-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/menu-cart-link-problem/page/2/?output_format=md)

The topic ‘Menu Cart Link Problem’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-menu-bar-cart/assets/icon-256x256.png?rev=2190481)
 * [Menu Cart for WooCommerce](https://wordpress.org/plugins/woocommerce-menu-bar-cart/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-menu-bar-cart/reviews/)

 * 17 replies
 * 5 participants
 * Last reply from: [sharongraylac](https://wordpress.org/support/users/sharongraylac/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/menu-cart-link-problem/page/2/#post-3984207)
 * Status: resolved