Categories list shortcode allows you to show a list of categories with links anywhere you wish. For example this demo page.
This shortcode is available in Pixwell version 4.3 or above.
To add the categories list shortcode, Input as below:
the categories list shortcode support a lot of params, that allow you to control exactly what you need to display.
categories– The category slugs to display. separate by commas, ie:
tech,fashionLeave blank if you would like to show all categories
layout– the layout of the list, the theme support 3 layouts:
columns– The number of columns to display. Defaults to
2. Allow values: 1,2,3,4,5
total– Total categories to display.
offset– Number of categories to displace or pass over. This value is helpful if you would like to paginate the page.
exclude_ids– Excluded categories ID. separate by commas, for example
1, 2. This params only value if the categories param is empty
description– The category description, allow integer value. Leave blank if you would like to disable.
-1to display full description. Integer value, ie
50– Total description words to show.
hide_empty– Hide empty categories, allow value:
1to hide empty categories.
Examples of Shortcode Scenarios
Display exactly 4 defined categories with the description in list layout 2 columns
[rb_categories categories="tech,fashion,news,beauty" columns="2" layout="list" description="20"]
Display all categories but exclude category id 5 and hide all empty categories and circle 5 columns without description.
[rb_categories exclude_ids="5" columns="5" layout="circle" hide_empty="1"]
How to find category slugs?
To find the Category slug go to the Posts > Categories, the slug will appear as below
How to find a category ID?
To find the Category slug go to the Posts > Categories, then select a category. the ID will appear as below
How to add this shortcode to Hompage
Shortcodes is very flexible, that allows you to add anywhere on your website.
To add the categories list to Your Homepage (Ruby Composer). Follow the steps below: