• Resolved David Borrink


    I just migrated a site from Ecwid to WooCommerce via a cart service. All the products, categories and subcategories have come over. When I went to the Shop page and chose the display setting to be “categories”, only five of the ten main categories appears. The five that do show up have direct products attached to them. The five that do not show up have subcategories, and these subcategories DO have products attached to them.

    I have checked that the subcategories are properly listed under parent categories, and that they do have attached products.

    If I change one of the subcategories to be a main category, then it shows up on the shop page. Changing it back to a subcategory still winds up being “hidden”. I set the category pages display to be any of the three options of subcategories and/or products and I still do not get parent categories to show up on the shop page.

    I have also tried variations of the “display” settings in the category edit panels.

    I have tested a generic WordPress theme and the problem remains.

    Since all the products, categories and subcategories came over in the migration properly and appear to be attached correctly, I’m not sure what the problem may be. Especially when I can set a subcategory as parent and it does show up on the Shop page as well as the products attached to it when I click on it.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter David Borrink


    I’ve been reading several posts here that are related to this issue and I’m seeing situations where people say there was a change that subcategories don’t work on the “Category page” choice in the Customizer. I’m starting to wonder if my idea of using subcategories is valid, or do I need to tell my client that they cannot do subcategories under their main categories.

    Thread Starter David Borrink


    After reading about another situation here on the WP Woo boards, involving migrating from another cart system, I tried a suggested action and got it fixed!

    Here’s how I did it.

    I created a brand new category called “A Test Category” and a new subcategory called “A Test Subcategory” (naming them so they’d appear at the top of the category list).

    I then went into my dashboard product listing and filtered one of the categories that wasn’t coming up, and added the first one to the new subcategory. The result was the test product category did show up with the test subcategory appearing on the next page, then the product I added. AND….

    … the missing real Parent category for the product I added showed up! I thought, “maybe this corrects some database structure when I did this”. So I added a product from each of the other four missing parent categories to the new test subcategory.

    YES… it made all the missing categories show up! So apparently something just needed a little “kick” by what I did. Everything now shows up.

    Hope this helps someone else. Nothing else made sense.

    Thread Starter David Borrink


    I’m following this up a couple months later and ran into it again, this time on my wife’s site when we wanted to use subcategories for the first time. We created some new parent categories and wanted to put some existing categories under them. There were products in the existing categories, but the new parent was not showing up on the main shop page. I tried the above method again.

    By creating that same “A Test Category” and “A Test Subcategory” setup, then adding one existing product of the existing subcategory into “A Test Subcategory”, something clicked and fixed itself, allowing the new true parent category to show up.

    NOTE TO WOOCOMMERCE: this would seem to be a bug that needs attention. My first experience was using a theme from GeneratePress, but this situation involves the Genesis Framework, so it’s not a theme issue.

    You are great man! thankyou

    Thread Starter David Borrink


    And that’s why we all share the “hacks” we find. 🙂 Glad you were helped by my tip.

    Amazing! This was driving me crazy; now it’s resolved. Thank you.

    Thread Starter David Borrink


    Great! I had Woo people contact me and they couldn’t replicate this, but now there are four instances here where this situation got fixed. Like I told one of my clients recently, “sometimes this all makes perfect sense, and sometimes it feels like voodoo”. Weird. But at least we can find ways to make it work sometimes. And “just because it does” seems to be the answer once in a while.

    Strange indeed!

    I’ve never experienced this until just now.
    I imported 5000 products and about 300 categories.
    All products where then automatically assigned to their respective categories, all good!

    But some categories where invisible on shop and category-archive pages, just like you describe.

    The “hidden” categories was categories with 0 products, but with subcategories containing products.

    It did not work to recount terms from Woocommerce -> Status -> Tools.

    I then went into a random product, and just assigned it to a random category that already existed and saved.

    BAM! All categories now show up all over, just as they should.

    It also worked by using a code snippet and adding this to it:
    add_filter( ‘woocommerce_product_subcategories_hide_empty’, ‘__return_false’ );

    (I tried the code-snippet thingy first, and when I noticed it worked, I turned off the code snippet again, and then checked the shop page -> Categories where gone again. – Then I tried as you said, and yep – This is definately a bug in the system.)

    Thread Starter David Borrink


    I know. It feels like one of those situations where the mechanic just kicks the car and it runs right and no-one can explain why. LOL. But it works.

    It’s some combination of activating a category or subcategory that happens and it clears out *something* in the system.

    But hey, at least my post is helping someone every now and then.

    +1 for running into exactly this issue and was able to replicate on a staging site.

    For now I’m using the show-empty-subcategories snippet but that has the side-effect of showing the empty Uncategorized category.

    Hello @slomeli79

    Thanks for reaching out.

    For further investigation on your case (since each site setup is different), please feel free to create your own forum thread at:

    This is to make sure that every user’s issues receive their own thread with proper attention.

    * Frequently Asked Questions

    Thank you!



    @davidborrink thank you so much! I honestly never thought this was going to work but I tried it and it did! Thank you so, so much for sharing your solution so that others who encounter the same problem can resolve it too. I am so, so appreciative!

    Thread Starter David Borrink


    You’re welcome, Rach! I’m glad every time someone is helped by this. I just had to do this again on my wife’s site after a major product overhaul with new subcategories added, just last week.

    Hello sir i hope you are srill active, i still have the same problem, but my problem is that i added the main categorie to the main menu to Access to subcategories. I can see the subategories when i click but since the products are linked to the main categorie they will show up at the bottom. Is there any solution to hide them? Please im waiting for your answer.

    Thread Starter David Borrink


    Hi tchris352, I just happened to get an email notice of your note. I’m wondering if you are aware that when you use the Customizer and choose the WooCommerce area, there are settings for the “Product Catalog” as to how to display items in your Shop. There are choices for “Shop Page Display” where you can choose to show categories and then on the “Category Display” choice where you can choose to show “Subcategories”.

    Or, if your products are set to be categorized as both a main category and a sub category, maybe you only need to pick one. Without knowing what your setup is, I’m guessing at this point.

    If you’re asking about menus, then those are where you’d be manually placing items in the menu setups.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Categories not showing up, but subcategories do have products’ is closed to new replies.