Can you change the names of Knowledge Base and Community?

Answered

45 Comments

  • Josh Clayton
    Comment actions Permalink

    @Wes - It worked like a charm for the community and knowledge base.  The final code I used is....

    $("h2.search-results-subheading:contains('Community')").replaceWith('<h2>Partner Discussion <a href="/hc/communities/public/topics" class="search-results-subheading-link"> browse</a></h2> ');

    $(".search-results-column a:contains('browse Community')").text('browse Partner Discussion');

    $("h2.search-results-subheading:contains('Knowledge Base')").replaceWith('<h2>iMentor Resources <a href="/hc/" class="search-results-subheading-link"> browse</a></h2>');

    $(".search-results-column a:contains('browse Knowledge Base')").text('browse iMentor Resources');
    });

    Just wanted to let you know in case you wanted to post this somewhere else.  Thank you for your persistence.  Does zendesk know how awesome you are or can I tell them somehow?

    1
  • Andrea Saez
    Comment actions Permalink

    Hi Josh,

    You can add a little JS to modify the text. For example, to change the community to something else, you would use:

     {

    $('section .community h4').text('LALALA');

    }

    0
  • Josh Clayton
    Comment actions Permalink

    Thanks Andrea.  Can you be a little more specific.  I tried to go into JS in the theme editor and post your code, but it didn't work in preview.  Is there a specific place I should be inserting it on the page?  Is that all the code I need?  Any additional input would be really helpful.

    Thanks.

    0
  • Andrea Saez
    Comment actions Permalink

    Hi Josh,

    I would think it depends on the template (I'm hoping they all have the same code, but there could be slight differences). Make sure that it is being inserted before the last closing bracket.

    0
  • Josh Clayton
    Comment actions Permalink

    I still couldn't get it to work.  I'm using the Humble Squid theme and had pretty good success implementing community code without much experience.  I am attaching a screen shot of the code as well as the results.  I'm hoping it is something minor I'm just overlooking.  Thanks for any insight.

    0
  • Andrea Saez
    Comment actions Permalink

    Your window.addEvent doesn't have a closed bracket after it, I suspect this may be the issue ;)

    0
  • Josh Clayton
    Comment actions Permalink

    Good catch.  I'd been playing around with where I put it and got sloppy.  Unfortunately, that didn't  resolve the issue either.  I'll leave you alone now, though.  Thanks for all the attempts :)

    0
  • Andrea Saez
    Comment actions Permalink

    Hm, that's very strange... It worked on my end. I'm not at home anymore to do a bit more digging... But shout out to moderator Wes, maybe he can do a bit of research and help you out!

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - I've posted code in another forum on how to change those names.  Let me see if I can find it for ya.

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - Take a look here as I think this is what you are looking for.

    https://moderatorwes.zendesk.com/hc/en-us/search?utf8=%E2%9C%93&query=test

    Code:

    $(".search-results-column h2:contains('Community')").text('Partner Discussion');
    $(".search-results-column a:contains('Community')").text('browse Partner Discussion');

    0
  • Josh Clayton
    Comment actions Permalink

    It almost works.  Thanks for your diligence.    You can see from the screenshot that it also changed the question titles into "browse partner discussion."  Any fix for that?  

    0
  • Josh Clayton
    Comment actions Permalink

    @Wes And I love your Help Center font in your example.  Which is that?

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - I'm sure I can figure something out.  This one is a little tough but I'm up for the challenge.  The font that I used is a Google font called Nunito.

    You can add by do the following:

    Document Head

    <link href='https://fonts.googleapis.com/css?family=Nunito:400,700' rel='stylesheet' type='text/css'>

    CSS will look something like below.  You will need to merge this in or comment out the body and hX titles that are there.  

    body {
    background-color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #fff;

    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
    }

    /* Titles */
    h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #fff;
    }

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - Give this a try for me

    $("h2.search-results-subheading:contains('Community')").text('Partner Discussion');
    $(".search-results-column a:contains('browse Community')").text('browse Partner Discussion');

    0
  • Josh Clayton
    Comment actions Permalink

    @Wes Almost there.  The only issue is this now eliminates the "browse" link to the right of the heading when results are returned.  So it allows you to see questions that match, but not go directly to the community (see screenshot).  Notice the word "browse" is still on the left hand column where I didn't alter the code.

    However, when no results are returned, it does say "Browse Partner Discussion" under the heading.  Hope this makes sense.

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - Almost there.  Swap this one out with the one you have.

    $("h2.search-results-subheading:contains('Community')").replaceWith('<h2>Partner Discussion <a href="/hc/communities/public/topics" class="search-results-subheading-link"> browse</a></h2> ');

    0
  • Wes Drury
    Comment actions Permalink

    @Josh - Awesome glad to hear you got everything working and thanks for the kind words but that's what the Community Moderators are here for - we eat, sleep, and breath Zen :-)  You know where to find me if you need any additional help.

    0
  • Andrea Saez
    Comment actions Permalink

    Ah, it was for search results. I was focusing only on the homepage. There we go! Glad Wes was able to help :)

    0
  • Meredith Pettet
    Comment actions Permalink

    This is exactly what I'm needing as well! Should this still work with the new community code? I have enabled Community v2 beta and am using a customized Humble Squid theme. Are code updates necessary to get this working? It is currently jacking up my categories so they do not display all. Hopefully 1 of our developers can take a deeper look since we use a Pinterest-ish category fill but didn't know if someone had already figured this out and was willing to share. Thanks in advance!

    0
  • Wes Drury
    Comment actions Permalink

    @Meredith - Yes this should work and I just used it on a theme yesterday however it does depend on the theme as the classes are sometimes different on different themes.  I'll take a look at the Humble Squid and verify.  Is it possible to post a link to your Help Center so that I can see your code running.

    0
  • Meredith Pettet
    Comment actions Permalink

    @Wes - Of course! Here's 1 of our Help Centers. Don't judge too much; I'm not as adept as you in this realm! :) Thanks for taking a look!

    0
  • Wes Drury
    Comment actions Permalink

    @Meredith - You are wanting to change the title of your Community correct.  What else were you looking to change.

    0
  • Wes Drury
    Comment actions Permalink

    @Meredith - Yes V2 is a little different as they added the drop downs so this should change the Community drop down.  I think your theme looks great!  I believe this is what you are needing and if you need something else just let me know.

    //Change Community dropdown name

    $(".dropdown-toggle h1:contains('Community')").text('ProductName Community');

    //Change Breadcrumbs name

    $(".breadcrumbs li a:contains('Community')").text('ProductName Community');

     

    0
  • Meredith Pettet
    Comment actions Permalink

    @Wes -  Yes, we want to add 'OurProductName Community' when search results are displayed as well as update the breadcrumb to display the same. We also want 'OurProductName Resources' instead of Knowledgebase. I just tried inserting into JS section, at the very bottom before the closing bracket, and it doesn't allow for the categories to compare heights to know to go to left or right column. Thank you again for working with me on this!

    0
  • Wes Drury
    Comment actions Permalink

    @Meredith - Insert the two lines I gave you right below the $.document.ready function.  This will ensure it is not interfering with the code near the bottom.

    0
  • Meredith Pettet
    Comment actions Permalink

    @Wes- Thank you for such an unbelievably quick turn around on answering my question! I have a little more work to do but I believe my CEO will be happy! :) 

    0
  • Wes Drury
    Comment actions Permalink

    @Meredith - Your welcome and tell your CEO to give you a raise!! :-)  If you need anything else or run into any other issues just let me know.  Have a great day.

    0
  • Tracey Bunyard
    Comment actions Permalink

    Hi, I'd also like to be able to do this with my customized Swiftest Elk theme. I've tried the various codes above but with no joy. Can you help please? 

    Thanks. 

    0
  • Wes Drury
    Comment actions Permalink

    @Tracey - Hi and I'll be glad to try and help you but can you please provide me with a few more details.  Can you tell me exactly where you are wanting to change things.   

    0
  • Tracey Bunyard
    Comment actions Permalink

    Wes, I would like to change the text 'Community' to 'Community FAQs' within the Swiftest Elk theme on the home page. I'm not bothered if the name change doesn't get replicated through out the system, I'm trying to make the link to the community section more obvious! 

    Thanks Tracey

     

     

    0

Please sign in to leave a comment.

Powered by Zendesk