Automatic menu links
If your WordPress theme uses the classic menu builder, the WithWine plugin adds Login, Register and Cart links to your main menu automatically.
Choose where the links appear
In WordPress admin, go to Settings > WithWine.
In Login / Logout Link Container ID, Register Link Container ID and Cart Link Container ID, enter the HTML ID of the place where each link should go. You can also enter a CSS class selector, for example
.ww-cart-goes-here.To hide a link, enter an ID that doesn't exist on your website, for example
ww_do_not_render_this.Click Save Changes.
For example, in Elementor you can give an empty container the class ww-cart-goes-here and enter .ww-cart-goes-here as the cart location.
Add a cart button anywhere
[withwine type='menu-cart-link' /]
data_badgesets where the number of items shows: after (default), before or none.data_contentsets the button content, for example text or an image.
Show links only to logged-in or logged-out customers
[withwine type='conditional-content' data_showif='loggedout' data_action='login' data_text='Log in' /]
[withwine type='conditional-content' data_showif='loggedin' data_action='logout' data_text='Log out' /]
data_action can be login, logout or a web address.
Things to know
The cart is available on every page. It opens when a customer clicks Show Cart on a product or the cart link. The cart shows each product, the quantity, shipping and the Empty Cart, Continue Shopping and Checkout buttons.
Change the empty cart message, subtitle, button text and image in Settings > WithWine, under Cart Settings.
If you use the newer WordPress block editor menus (Gutenberg), add the links yourself with the shortcodes above.
