[show_categories] shortcode is available with various attributes:
- exclude – to exclude categories by id from the listing
- include – to show only specific categories (default is all categories from catalogue)
- archive_template – to choose specific archive template for this particular listing (default is the selection in product settings)
- parent – use 0 to show only top level categories or use category id to show its child product categories
- orderby – to set product categories order – available values: id, count, name, none (default is name; when include is used without orderby, the categories keep the order of the include list)
- order – set the order to ascending or descending – available values: ASC, DESC (default is ASC)
- per_row – set shortcode categories per row (default is the per row setting of the selected listing template)
Show categories on home page or any other page
To show product categories on home page you will need to create a new page and assign it as a home page in WordPress Settings > Reading menu.
To show product categories on this page you will need to paste [show_categories] shortcode on it.
Shortcode usage examples
See some categories shortcode usage examples below. If you need some additional usage examples please contact our support. We will add them here.
Show specific categories in a given order:
[show_categories include="32,532,123,563"] – where numbers are category ids. Without the orderby attribute, the categories show up in the order specified by the include attribute.
You can also display categories with the Show Categories block or the Product Category Widget. To change the default category order on catalog pages, see Change Product Category Order.
