Knowledge Base includes multiple shortcodes for embedding the knowledge base, search form, breadcrumbs, alerts, and related articles anywhere in your content.

You can display the knowledge base anywhere in your blog using the [knowledgebase] shortcode. The shortcode takes one optional attribute category, e.g.:

[knowledgebase category="92"]

category: Category ID for which you want to display the knowledge base. You can find the ID in the Sections listing under the Knowledge Base menu in the WordPress Admin

Display the search form using the [kbsearch] shortcode.

You can display the knowledge base anywhere in your blog using the [kbbreadcrumb] shortcode. The shortcode takes one optional attribute separator, e.g.:

[kbbreadcrumb separator=" >> "]

separator: The separator is used between each “crumb” of the entire breadcrumb

Render a table of contents for the current article. The TOC is built from the article’s headings and respects the same depth and minimum-heading settings as the auto-generated TOC.

[kbtoc]

Optional attributes override the global settings for that placement:

AttributeAliasDefaultDescription
heading_depthheadingdepthSetting valueMaximum heading level to include (2–6).
min_headingsminheadingsSetting valueMinimum headings required before the TOC is shown.
titleSetting valueLabel above the TOC list. Pass an empty string to hide it.

Example:

[kbtoc heading_depth="3" title="Contents"]

See Table of Contents for the full feature guide.

Display a list of related articles below any content. Uses the same relevance engine as the automatic related articles feature.

[kb_related_articles]

Optional attributes:

AttributeDefaultDescription
numberposts5Number of related articles to show.
show_thumbtrueShow article thumbnails.
show_datetrueShow article publish dates.
title<h3>Related Articles</h3>Section heading; accepts HTML.
thumb_sizethumbnailRegistered image size for thumbnails.

See Knowledge Base Related Articles for developer hooks and advanced usage.

You can use this shortcode to display a different set of alerts within your Knowledge Base articles or even the rest of your WordPress site. This is similar to what you’d see in Bootstrap or other plugins.

The shortcode takes three optional attributes e.g.:

[kbalert type="secondary" class="alert" text="Additional text"]A secondary alert[	
]
  • type: alert type as per the screenshot above. Default is ‘primary’
  • class: additional classes to include in the wrapping div as a space or comma separated list. Default is ‘alert’
  • text: any additional text you want to include before the wrapped content. In the above example, the wrapped content is “A secondary alert”

Was this article helpful?