[Resolved] Place WC Shop cart in Top Bar

Home Forums Support [Resolved] Place WC Shop cart in Top Bar

Home Forums Support Place WC Shop cart in Top Bar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #835843
    James

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

    Cheers.

    #836085
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #836779
    James

    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.

    #837070
    Tom
    Lead Developer
    Lead Developer

    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?

    #837100
    James

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

    #837166
    Tom
    Lead Developer
    Lead Developer

    Awesome ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.