Sub-Categories
The Sub-Categories shortcode for WordPress can be used to list child categories of a set ID category or of the current category if no ID is set. Check below for example implementations and shortcode documentation:
Sub-Categories Examples
Sub-Categories Shortcodes
Shortcode
[x3m-subcategory categoryid="1" maxentries="10" column="2"]Sub-Categories Documentation
Here are the shortcode option settings available for Sub-Categories:
| Shortcode Settings | Details |
|---|---|
| categoryid=”1″
optional |
This is used to set the category ID for which category the child categories will be listed.
If no categoryid is set, it will pull sub-categories of the current category (where the shortcode is published: category description or post). |
| maxentries=”10″
optional |
This is used to set the maximum number of sub-categories to be included in the list. Categories are ordered alphabetically.
If no maxentries is set, it will display all sub-categories of the category. |
| columns=”2″ | This is used to set the number of columns used to display the list.
Values accepted are “1”, “2” or “3”. For high number of sub-categories to be listed, it is advisable to display them in columns. |
| pagination=”yes”
optional |
This is used to add a pagination to the displayed list. If the list contains more items than the number of columns * max entries, then it will include a pagination at the bottom of the list.
Value accepted is “yes”. |