How to Change the Logo Link

Navigation is a huge part of a successful knowledge base. Giving your users an easy way to get back to your company website or application is pretty crucial 🙃

Taylor Sloane
Updated by Taylor Sloane

Navigation is a huge part of a successful Knowledge Base. Giving your users an easy way to get back to your company website or application is pretty crucial 🙃 We've made sure adding custom navigation links to your docs is super easy.

But what if you want to change where users navigate when they click on your company logo?

There's no out-of-the-box way to do that in the HelpDocs dashboard. But luckily it's super easy to do with a couple of lines of code 💪

  1. Head to Settings > Code > Javascript (or click here)
  2. Paste one of the snippets below (choose the right one for your template) into the text editor
  3. Change your-link-here.com to the URL you wanna link to
  4. Hit Save Changes

The code

Bars v4

<script>
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function() {
var el = document.querySelector('a.hnBranding');
if (!el) return;
el.href = 'https://your-link-here.com/';
});
</script>

All other templates

<script>
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function() {
var el = document.querySelector('a.navbar-brand');
if (!el) return;
el.href = 'https://your-link-here.com/';
});
</script>

What did you think of this doc?

Making Tables Scroll When They're Too Wide for the Page

How to Add Extra Spacing

Get in touch

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.