Articles on: Crisp Knowledge Base

How can I customize my Knowledge Base layout?

**If you would like to customize your Knowledge Base layout, you can do so using Custom code. In this article we will provide you with some code snippets you can use in order to customize your Knowledge Base. **


Customize the Knowledge Base


If you're not familiar on where to add your custom code, you can follow this article here.


Jump to:


Removing the "Go to website" button


<style>
header .csh-header-main-actions-website {
display: none !important;
}
</style>


Before code added


After code added


Change the "Search on help center..." text


<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelector('.csh-header-search-field input').placeholder = "New placeholder";
});
</script>


Before code added

After code added



<style>
footer .csh-footer-ask {
display: none !important;
}
</style>


Before code added

After code added


Removing the "Chat" button


<style>
footer .csh-footer-ask-buttons .csh-button-icon-chat {
display: none !important;
}

.csh-footer-ask-text-label {
display: none !important;
}
</style>


Removing the "Send us an Email" button


<style>
footer .csh-footer-ask .csh-button-icon-email {
display: none !important;
}

.csh-footer-ask-text-label {
display: none !important;
}
</style>


Before code added (for chat button)

After code added (for chat button)


Change the text of the contact us buttons


<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelector('.csh-footer-ask-buttons .csh-button-icon-chat').innerHTML = "Open the chatbox";
document.querySelector('.csh-footer-ask-buttons .csh-button-icon-email').innerHTML = "Email me!";
});
</script>


Before code added

After code added


Change the "Not finding what you are looking for?" texts


<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelector('.csh-footer-ask-text-title').innerHTML = "New title";
document.querySelector('.csh-footer-ask-text-label').innerHTML = "New label";
});
</script>


Changing the font for the entire Knowledge Base


<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
<style>
* {
font-family: "Open Sans" !important;
}
</style>


Hiding the the Article Popularity


<style>
.csh-category-item-meta-popularity {
display: none !important;
}

.csh-category-item-meta-separator {
display: none !important;
}

.csh-category-item a .csh-category-item-meta .csh-category-item-meta-description {
flex: 1 !important;
}
</style>


Before code added

After code added



<script>
window.addEventListener('DOMContentLoaded', (event) => {
let links = document.querySelectorAll('a.csh-markdown.csh-markdown-link.csh-markdown-link-text');

links.forEach(link => link.target = '_self');
});
</script>


Joining Tip Boxes


<script>
document.addEventListener("DOMContentLoaded", () => {
let tipsGreen = document.querySelectorAll(`[data-type="|"]`);
let tipsYellow = document.querySelectorAll(`[data-type="||"]`);
let tipsOrange = document.querySelectorAll(`[data-type="|||"]`);

for (let tip of tipsGreen) {
if (tip.nextElementSibling.className === "csh-new-line" && tip.nextElementSibling.nextElementSibling.dataset.type === tip.dataset.type) {
tip.style.borderRadius="5px 5px 0 0";
tip.nextElementSibling.nextElementSibling.style.borderRadius="0 0 5px 5px";
tip.nextElementSibling.remove();
}
}
for (let tip of tipsYellow) {
if (tip.nextElementSibling.className === "csh-new-line" && tip.nextElementSibling.nextElementSibling.dataset.type === tip.dataset.type) {
tip.style.borderRadius="5px 5px 0 0";
tip.nextElementSibling.nextElementSibling.style.borderRadius="0 0 5px 5px";
tip.nextElementSibling.remove();
}
}
for (let tip of tipsOrange) {
if (tip.nextElementSibling.className === "csh-new-line" && tip.nextElementSibling.nextElementSibling.dataset.type === tip.dataset.type) {
tip.style.borderRadius="5px 5px 0 0";
tip.nextElementSibling.nextElementSibling.style.borderRadius="0 0 5px 5px";
tip.nextElementSibling.remove();
}
}
});
</script>


Before code added

After code added


Note: the text should be formatted like this:



<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelector(".csh-header-main-logo").href = "NEW_URL"
});
</script>


Adding a drop shadow to all images automatically


<style>
.csh-markdown-image img {
box-shadow: rgba(0, 0, 0, 0.3) 0px 12px 38px, rgba(0, 0, 0, 0.22) 0px 8px 12px;
}
</style>

Want to use a different drop-shadow style? Don't hesitate searching some pre-made templates online such as theses ones.
You can copy the styling and replace the one in the code above. Enjoy!

Updated on: 28/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!