Knowledge Base

Working with multiple category breadcrumbs

When an article is assigned multiple categories, it appears in all the categories it is assigned. This means that only one article needs to be updated. For example an article about how to reset the password could appear in three categories :-

Knowledge Base > Account > How do I reset my password?
Knowledge Base > App > Account > How do I reset my password?
Knowledge Base > Site Queries > How do I reset my password?

multiple-category-breadcrumbs

A breadcrumb will appear for each category the article is assigned. This is expected behaviour, because WordPress does not keep a record of the path the visitor took to reach the article, or the article may have been reached directly.

categories-multiple-assignment

 

 

If you wish to alter the standard behaviour to display something different you will need to take one of the following approaches:

Turn off breadcrumbs

Breadcrumbs can be turned off completely from Knowledge Base > Settings > General > Display breadcrumbs in knowledge base. This is the simplest way to remove the breadcrumbs from

Create duplicate articles and assign to just one category

Using a plugin such as Duplicate Post, you can create a clone of an article each category. Assign each clone it’s own, single category.

The downside of this approach is each of these articles will have it’s own comments voting and meta and you will need to update each article if you want to make a change to the content.

Hide all other category breadcrumbs

Using CSS you can hide all but the first breadcrumb.

KnowAll

Open the theme customizer from:

Appearance > Customize > Theme > Custom CSS

and paste the code below

Standalone Plugin

Knowledge Base > Settings > Custom Style

Add this snippet of CSS

/* Hide all breadcrumbs */
.hkb-breadcrumbs {
display: none;
}
/* Show first child breadcrumb */
.hkb-breadcrumbs:nth-child(1) {
display: initial;
}

Was this article helpful?

Related Articles