• Resolved mstholman

    (@mstholman)


    I have a list of intentions that I want people to be able to browse by on my website. However, I just want to display products from the parent category “Intention” and exclude products from the parent categories “Jewelry Type” and “Metal Type.” If you look at the list you’ll see the parent categories as well as the child categories (bracelets, earrings, necklaces; rose gold filled, gold-filled, and sterling silver). I turned off the hierarchy so it doesn’t display “Intention” as the header since that’s already the name of the page, but it still displays “Intention” in the actual list. I have this code:

    <!– wp:woocommerce/product-categories {“hasCount”:false,”hasEmpty”:true,”isHierarchical”:false} /–>;

    I am just wondering what I need to add to exclude anything under the other parent categories. There would be too many products under each category to use product IDs.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • This question might best be directed at the authors of the Woocommerce plugin, since you need to organize and display product categories and you pasted the code of a Woocommerce block.

    The Tag Groups plugin does not interact with these things and I am afraid that it cannot help you achieve what you described above.

    Thread Starter mstholman

    (@mstholman)

    Hi Chris,

    I appreciate your response, thank you for pointing out my mistake! I do have the Tag Groups plugin installed and must have been mixing up WooCommerce’s product categories and Tag Groups’ product tags. I think what I need to do is add the tags in Tag Group Administration and then use the Alphabetical Tag List as I did with my other directory using this code block: <!– wp:chatty-mango/tag-groups-alphabetical-tag-index {“source”:”gutenberg”,”h_level”:1,”hide_empty”:0,”include”:”3″} /–>

    Apologies for the confusion!

    No problem! 🙂

    If you want to use the alphabetical tag list to display tags, you could sort them into groups (in the backend) and then use the menu in the block (in the editor) to include/exclude groups so that you show only particular subsets of tags. See https://documentation.chattymango.com/documentation/tag-groups/alphabetical-tag-cloud-tag-clouds-and-groups-info/alphabetical-tag-cloud-gutenberg-block-2/#include-groups

    Please note that these “groups” are not linked to WooCommerce’s product categories. You could, however, mirror these same categories as groups if you want to use them to include and exclude tags.

    Thread Starter mstholman

    (@mstholman)

    Thanks so much! I don’t know why I didn’t think of that in the first place; it was easy enough to bulk edit the existing categories and create the corresponding tags to get the result I was looking for. Much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide categories from Product Categories List’ is closed to new replies.