Site logo

Archived topic

Place WC Shop cart in Top Bar

5 replies · Started by James on March 11, 2019

Viewing posts 1–6 of 6

Is it possible to place WooC Shop cart in the Top Bar?

Cheers.

Hi there,

You could try to add it to the Secondary Navigation.

1. If there are no widgets in the Top Bar widget area, you need to add an empty one using the Custom HTML widget:

<!-- empty widget -->

2. If you don't have a secondary navigation, you need to create an empty menu in "Appearance > Menus" and add it to the Secondary menu location.

3. Now we can tell the cart menu item to show up in the secondary navigation:

add_filter( 'generate_woocommerce_menu_item_location', function() {
	return 'secondary';
} );

Let me know if this helps or not :)

Thanks Tom - I'll save this and compare it with the other option I saw of hiding cart while empty.

Another Question regarding WooC.

I've set Customize/WooC/Product Catalog to show categories on the Shop page, and products on the category pages. I have two Categories set up with products assigned, but the Shop page just shows both products instead of the category hierarchy.

I've been on the WooCommerce forums and those with a similar issue have been told it's a problem at the theme/plugin end.

Hi there,

The theme itself shouldn't prevent that core WC option from working.

I just checked out your site and the store doesn't have any products right now. Can you try adding some with categories?

OK - I had the products set to private for testing. Setting them to public displays the categories as expected.

Awesome :)

This archived topic is closed to new replies.