Title: Shortcode for parent categories?
Last modified: August 20, 2016

---

# Shortcode for parent categories?

 *  [yoshituk](https://wordpress.org/support/users/yoshituk/)
 * (@yoshituk)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/)
 * Hi there,
 * I know there is a shortcode ([product_categories number=””]) which is to show
   all your categories. But Is there a solution to just show all the parent categories?
   Or how do I specify manually which categories I want to show by slug..
 * Hope someone knows..
 * Thanks!
 * [http://wordpress.org/extend/plugins/woocommerce/](http://wordpress.org/extend/plugins/woocommerce/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [scruffy1](https://wordpress.org/support/users/scruffy1/)
 * (@scruffy1)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146780)
 * these should help I have put text in between the “” which is where you specify
   the category,
 * [product_category category=”enter slug of category you want to show” per_page
   =”12″ columns=”4″ orderby=”date” order=”desc”]
 * there is also a shortcode button when you edit pages for the woocommerce, it 
   is purple coloured button along top bar in the visual edit for the page
 * hope this helps you
 *  [kchayka](https://wordpress.org/support/users/kchayka/)
 * (@kchayka)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146876)
 * I wanted just the parent categories as the default on the shop page and figured
   this out after some hunt and peck/trial and error in the WooCommerce Settings-
   >Catalog
 * Check the first 3 boxes under Show subcategories:
    Show on category pages Show
   on the shop page hide products
 * That second one is completely non-intuitive and sounds like a bug, but it did
   what I wanted.
 *  [jamiesbw](https://wordpress.org/support/users/jamiesbw/)
 * (@jamiesbw)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146917)
 * Thank god someone has had similar troubles. Do any of you know how to show certain
   categories on the home page,
 * I tried this [http://docs.woothemes.com/document/woocommerce-shortcodes/](http://docs.woothemes.com/document/woocommerce-shortcodes/)
 * but it only shows products in the categories rather than the category itself.
 * Is there a shortcode for this.
 * Any help would be greatly appreciated
 *  [jamiesbw](https://wordpress.org/support/users/jamiesbw/)
 * (@jamiesbw)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146918)
 * .
 *  [elvinlee](https://wordpress.org/support/users/elvinlee/)
 * (@elvinlee)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146919)
 * [product_category category=”category slug”]
 * Is this work?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Shortcode for parent categories?’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 5 replies
 * 5 participants
 * Last reply from: [elvinlee](https://wordpress.org/support/users/elvinlee/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-parent-categories/#post-3146919)
 * Status: not resolved