[kbs_articles] shortcode enables you to display a list of KB Articles in any position on your web pages. The Articles being displayed can be customised by passing optional attributes to the Articles shortcode.
The articles shortcode should be added to any page where you would want to display a list of articles.
[kbs_articles] accepts a number of parameters enabling you to customise the results being displayed:
A comma separated list of Article post ID’s you would like to display
The number of articles you want to display. A value of -1 will display all articles that match the parameters provided
A comma separated list of author ID’s whose articles you would like to display
The order by which the found articles should be displayed. Possible values are views, views_month or any parameters as described here
Default: views (Order by number of total all time views)
Display the found articles in Ascending or Descending order
Default: DESC (highest to lowest)
A comma separated list of Article Tag ID’s that the displayed articles should include
Default: 0 (ignore)
A comma separated list of Article Category ID’s that the displayed articles should belong to
Default: 0 (ignore)
Whether a post should include both or either when providing both the tags and categories parameters. Possible values are AND or OR
Default: AND (ignored if you do not provide both the tags and categories parameters)
1 to display the article excerpt after the title or 0
1 to hide restricted Articles or 0 to display all Articles whether set to restricted or not
Default: value of Hide Restricted KB Articles settings option
Example Usage with Parameters
Display all Articles authored by user ID 10 without excerpts:
[kbs_articles author="10" excerpt="0"]
Display all Articles that contain the Tag ID’s 100 and 104 or are within category ID 120 regardless of whether or not they are restricted:
[kbs_articles tags="100,104" categories="120" tax_relation="OR" hide_restricted="0"]
Display all Articles ordered by the total number of views during the current month
Was this article helpful?
We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.
Please take a moment to let us know if you found this article helpful.