Home Forums WoodMart support forum Unhide Categories and SubCategories with no products in it

Unhide Categories and SubCategories with no products in it

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #280946

    shopakr
    Participant

    We just migrated all 770 Categories/Subcategories to our website. Alot of these Categories/Subcategories are not Displaying. The ones that are not displaying are the ones that do not contain any products. How can I make them Display still. Alot of our Categories do not have products because they are linking to the SubCategories that do contain the products. I have the following set: Appearance/Themes/Woodmart/WooCommerce/Product Catalog/shop page-Show Categories & category display-show subcategories

    Example: This Category: https://wordpress-548167-1777419.cloudwaysapps.com/product-category/chassis-parts/birelart/birelart-parts/ Has 24 SubCategories, and they are all in the back end. On the front end it is only displaying 17 of them. All 17 of those lead you directly to the Product Shop Pages because they contain product, but the other 7 categories that are not displaying lead you to more Subcategories.
    I feel like I am just missing a setting somewhere.

    #280947

    shopakr
    Participant

    Nevermind, I guess that is a Core WooCommerce setting to hide categories/subcategories when they are empty. I thought maybe it was a theme setting. I found a Code Snippet on the WooCommerce Support site to fix it.
    add_filter
    ( ‘woocommerce_product_subcategories_hide_empty’, ‘hide_empty_categories’, 10, 1 );
    function hide_empty_categories ( $hide_empty ) {
    $hide_empty = FALSE;
    }

    #281025

    Hello,

    Please check this tutorial on Product categories, there are options in the theme to hide empty categories, in additions, there is an option in the default Woocommerce widget: https://xtemos.com/docs/woodmart/product-category-menu/

    Best Regards

Viewing 3 posts - 1 through 3 (of 3 total)