Hi @flyntm
You would like to display the categories on a page, Have you tried something like this: [product_categories], more on this at https://docs.woocommerce.com/document/woocommerce-shortcodes/#section-9
Cheers!
Thread Starter
flyntm
(@flyntm)
I tried this and it displays the products within the category, not the categories themselves.
Thanks for your attention.
slash1andy
(@slash1andy)
Automattic Happiness Engineer
Hey there!
This is the code you would want to use for displaying categories ( this specific one is for top-level cats only) https://docs.woocommerce.com/document/woocommerce-shortcodes/#section-9
That page has all the info you need to tailor your shortcode
Thread Starter
flyntm
(@flyntm)
Thanks for your response. And, this was one of the articles I was using for reference. I have tried all of these shortcodes with these results.
[product_categories number=”0″ parent=”0″] – Displays all top level categories
[product_categories] – Displays all categories
[product_categories category=“category_slug”] – Displays all categories
[product_category] – Does Nothing
[product_category category=“category_slug”] – Displays ALLPRODUCTS within the category
[product_category category=“category_slug1, category_slug2”] – Displays all PRODUCTS within both categories.
[product_category category=“category_slug1, category_slug2”] – Displays all categories.
For reference, I only have 3 top-level categories and I want to display just 2 of them.
Thanks again.
@flyntm Try the [product_categories ids="100,101"] shortcode, replacing the 100,101 with the IDs of the categories you’re wanting to display.
The IDs of the categories can be found by clicking the link to edit the category, then getting the tag_ID from the address bar:

Link to image: https://cld.wthms.co/XuMRqt