Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Hide Category

  • Hi,
    I want to Hide the “freebies” category from appearing on my shop page. But still conserve this page category separately. How to do this?

    thanks for your assistance

  • Hi there,

    Try this CSS, it hides the 4th category in the woocoomerce category block, but if you add new categories, the order might change, so make sure you update the CSS if that happens:

    .woocommerce-shop ul.woo-cat-nav li:nth-child(4) {
        display: none;
    }

    And do you want the freebies products hidden on your shop page as well? or that’s fine?

  • hi Ling,
    after adding it appears as the freebie is hidden however, when i click on any another category for ex: coloring pages, the freebies appears.

    for reference: I would still like to keep this page:
    https://mysite.com/product-category/freebies/

    Just not have freebies visible in the shop

    Thanks again

  • for reference: I would still like to keep this page:
    https://mysite.com/product-category/freebies/

    Yes, it’s showing.
    https://app.screencast.com/h8siBeg2s1NAr

    Just not have freebies visible in the shop

    Right, the code should only hide it on the shop page.

  • Hi Ling,
    Sorry I mean to remove it anywhere on the shop AND other categories. It is still visible there for other categories ex: all-products/ coloring-pages-category/ etc.. and the rest. I would like it not to show up there.

  • Hi there,

    Try replacing Ying’s CSS above with this one instead:

    body.archive ul.woo-cat-nav li:nth-child(4) {
        display: none;
    }
  • Thanks very much. How would re-ogranizing the order (of the categories on the shop page) work going forward. I checked under customize for a woocommerce menu but didn’t find anything that would help me reorder.

  • I’m not sure if the woo category block allows reordering. you’d check with Woocommerce’s support.

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