How to Rename the Knowledge Base Tab in the Customer Portal
You can use custom JavaScript to rename the Knowledge Base tab displayed in the BoldDesk customer portal. For example, the JavaScript provided in this article changes the Knowledge Base tab label to FAQs in desktop and mobile views.
This customization changes only the text displayed in the customer portal navigation. It does not rename the underlying Knowledge Base module, categories, sections, or articles.
Prerequisite
Before applying the customization, ensure that your role has the Manage Settings permission.
Customer portal customization settings are brand-specific. Apply the custom JavaScript separately to each brand where you want to rename the Knowledge Base tab.
Rename the Knowledge Base Tab
To rename the Knowledge Base tab:
-
Go to Admin > Customer Portal.
-
Select the brand whose customer portal you want to customize.
-
Open Customization.
-
Locate the Custom JS section.
-
Paste the following JavaScript:
(function () { var locale_code = orgSettingsList.IsMultiLanguageEnabled ? `${locale + "/"}` : ''; var kb_ele_en_US = document.querySelectorAll( `a[href="/${locale_code}kb"] span[data-title], a[href="/${locale_code}kb"] .tab-text` ); if (kb_ele_en_US.length > 0) { kb_ele_en_US.forEach((ele) => { ele.setAttribute('data-title', 'FAQs'); ele.innerText = 'FAQs'; }); } })(); (function () { if (document.querySelector('#kb_tab')) { var kb_tab = document.querySelector('#kb_tab'); kb_tab.innerText = 'FAQs'; } if (document.querySelector('#mobile_kb_tab')) { var mobile_kb_tab = document.querySelector('#mobile_kb_tab'); mobile_kb_tab.innerText = 'FAQs'; mobile_kb_tab.classList.add('mobile-view', 'p-33'); } })(); -
Replace
FAQswith the label you want to display, if required. -
Save and publish the customer portal changes.
-
Open or refresh the customer portal and verify the updated tab label.
For instructions on adding custom JavaScript to the customer portal, explore How to Customize the BoldDesk Customer Portal.
Customize the Tab Label
The provided JavaScript changes the Knowledge Base tab label to FAQs.
To use another label, replace every occurrence of FAQs in the script with the required text.
For example, to display Help Articles, use the following JavaScript:
(function () {
var locale_code = orgSettingsList.IsMultiLanguageEnabled ? `${locale + "/"}` : '';
var kb_ele_en_US = document.querySelectorAll(
`a[href="/${locale_code}kb"] span[data-title], a[href="/${locale_code}kb"] .tab-text`
);
if (kb_ele_en_US.length > 0) {
kb_ele_en_US.forEach((ele) => {
ele.setAttribute('data-title', 'Help Articles');
ele.innerText = 'Help Articles';
});
}
})();
(function () {
if (document.querySelector('#kb_tab')) {
var kb_tab = document.querySelector('#kb_tab');
kb_tab.innerText = 'Help Articles';
}
if (document.querySelector('#mobile_kb_tab')) {
var mobile_kb_tab = document.querySelector('#mobile_kb_tab');
mobile_kb_tab.innerText = 'Help Articles';
mobile_kb_tab.classList.add('mobile-view', 'p-33');
}
})();
This customization changes only the navigation label. The Knowledge Base URL and its underlying functionality remain unchanged.
Before Customization
Before applying the custom JavaScript, the customer portal navigation displays the default Knowledge Base tab label.
After Customization
After applying the custom JavaScript, the customer portal navigation displays FAQs instead of Knowledge Base.
Troubleshooting
The Knowledge Base Tab Is Not Renamed
Confirm that:
- The JavaScript was added to the Custom JS section.
- The correct brand was selected.
- The customer portal changes were saved and published.
- The page was refreshed after publishing the changes.
- The JavaScript does not contain syntax errors.
- Every occurrence of the replacement label remains inside quotation marks.
The Updated Label Appears on Mobile but Not on Desktop
Confirm that the JavaScript includes the selectors for the desktop Knowledge Base navigation.
Also confirm that the script checks for #kb_tab before updating its text.
The Previous Label Is Still Displayed
The browser may be displaying a cached version of the customer portal.
Perform a hard refresh or clear the browser cache, and then reopen the customer portal.
The Customization Works for One Brand but Not Another
Customer portal customization settings are brand-specific. Add and publish the JavaScript separately for each brand where the Knowledge Base tab should be renamed.
The Tab Is Renamed, but It Does Not Open the Knowledge Base
The script should change only the visible text and data-title attribute. It should not modify the link’s href value.
Restore the script provided in this article and verify that the Knowledge Base URL remains unchanged.
Frequently Asked Questions
-
Can I rename the Knowledge Base tab in the customer portal?
Yes. You can use custom JavaScript to change the label displayed in the customer portal navigation. -
Does this customization rename the Knowledge Base module?
No. The customization changes only the text displayed in the customer portal navigation. -
Does this customization change the Knowledge Base URL?
No. The underlying link continues to open the same Knowledge Base page. -
Does the script update both desktop and mobile views?
Yes. The provided script contains selectors for the desktop and mobile Knowledge Base navigation elements. -
Can I configure a different label for each brand?
Yes. Customer portal customization settings are brand-specific, so each brand can use a different label. -
How can I restore the default Knowledge Base label?
Remove the custom JavaScript from the Custom JS section, and then save and publish the changes.