Our SmartDocs plugin contains a shortcode that can be used to display SmartDocs Categories along with their styles anywhere on the website.
You can simply add the shortcode smartdocs_categories anywhere on the site and get the Doc Categories.
Below mentioned are the parameters of the shortcode smartdocs_categories
show_count- This parameter can be used to show the number of docs in a particular category.The default value of the parameter is “yes”. Here is an example usage of
show_countparameter:[smartdocs_categories show_count="yes"].columns- This parameter can be used to show the number of columns in a particular category. Each column represents a Doc Category.The default value of columns is “3”. The accepted value can be anything out of 1, 2, 3.
Here is an example usage ofcolumnsparameter:[smartdocs_categories columns="2"]hide_empty- This parameter can be used to hide/show the Doc Categories with no docs added to them.The default value of
hide_emptyis “yes”, and the accepted values are “yes” or “no”.
Here is an example usage ofhide_emptyparameter:[smartdocs_categories hide_empty="no"]title_tag- This parameter can be used to set the Category HTML Title Tag. By default, we have set it to “H5”. The accepted value can be any HTML Tag, i.e, H1, H2, H3, H4, H5, H6.Here’s an example usage of
title_tagparameter:[smartdocs_categories title_tag="H2"]include/exclude- This parameter can be used to include or exclude Doc Categories while being displayed. This can be done by adding the Category IDs in the include/exclude parameter. Include will include those categories whose category ID has been added and similarly, exclude will exclude those categories whose category ID has been added.Below mentioned are the examples using both include and exclude parameters.
include-[smartdocs_categories include="3,8,10"]exclude-[smartdocs_categories exclude="2,5,9"]By default, all the categories are set to be displayed, so the shortcode is
[smartdocs_categories include=”all”]
orderby- To learn aboutorderbyparameter, have a read here: https://developer.wordpress.org/reference/classes/wp_term_query/__construct/
order- To learn aboutorderparameter, have a look here: https://developer.wordpress.org/reference/classes/wp_term_query/__construct/