Tip: How to change the url of the logo of your Help Center


  • Danny Cowlishaw

    Hi Trapta,

    Do you know if it is possible to change the link depending on the page you're visiting?

    For example, if I'm on the Community pages, can I make the logo link to the Community homepage rather than it go to the Help Center homepage? Is there an if statement that could handle this?

    For branding purposes we're looking to cut the ties between our HC and Community which we can't do at the moment as it links back to the HC when clicking the logo in the top-left.

    Thanks, Danny

  • Trapta Singh
    Community Moderator

    Hi Danny Cowlishaw,

    Try putting the below code at the bottom of your script.js file

    document.addEventListener('DOMContentLoaded', function() {
    function isCommunityTemplate() {
    if ( window.location.href.indexOf('community') > -1 ) {
    return true;

    var isCommunityPage = isCommunityTemplate();
    if ( isCommunityPage != undefined && isCommunityPage == true ) {
    var curLocale = document.getElementsByTagName('html')[0].getAttribute('lang').toLowerCase();
    document.getElementsByClassName('logo')[0].children[0].setAttribute('href', '/hc/'+ curLocale +'/community/topics');


    Let us know if this works for you.



Please sign in to leave a comment.

Powered by Zendesk