Hide Search bar in help Center home page

Beantwortet

21 Kommentare

  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Hey Andrea,

    You can remove this helper from your home_page.hbs :

    {{search submit=false instant=settings.instant_search class='search search-full'}}

    or may be there is

    {{search}}

     

    Now searchbar would be remove from there.

     

    You want to add only Thank You Message  so you can add text on there and add anchor tag ex:

    <h1> Thank you message </h1>

    <a href="#"> Add link of your website here </a>

     

    It depends on you where would you add these? If you want to use homepage as landing so remove all code from homepage and add this:

    <h1> Thank you message </h1>

    <a href="#"> Add link of your website here </a>

     

    If any issue let me know :)

    Thank you

    Team

    0
  • Customer Admin

    Yes! With

    {{search submit=false instant=settings.instant_search class='search search-full'}}

    search box is gone. There is only magnifier icon, can you help me to remove it too ?

    with this:

    <h1> Thank you message </h1>

    I can write in homepage correctly, but is on the left on the screen, I'm trying to write it centered

    Weird thing on the link:

    <a href="#"> Add link of your website here </a>

    inserted my homepage, but hover show HC link, if I click nothing happens...

     

    Thank you very much for help, very appreciated

     

     

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Okay,
    Remove # and add your websites's link in anchor tag.

    there would be use some css code for fix text center align.

    Magnifier icon comes from css code.

    so that need to be remove but not directly , there would be use parent class.

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Can you provide your hc link so I can fix it and give you the code.

    0
  • Customer Admin

    Hi Ifra,

    I Fixed alignement, removing all code and adding a DIV Style did all tricks, magnifier gone and text centered

    Thanks for help for link, now everything it's ok

    HC Homepage is lost, but it's what I need by now

    We'll recover standard HP when Guide will be ready

    Thanks for your precious support

    Cheers!

     

    0
  • Chris Hardy

    Is there a way to hide the search bar when a user isn't signed in?  We'd like all the articles behind the sign-in but the search bar is still visible when not signed in.  This can cause confusion because someone can search in it but no articles are returned.  

    Thanks
    Chris

    0
  • Bruce Michelsen

    In the home_page.hbs file in your theme, surround the search with if signed_in statements:

    {{#if signed_in}}
    {{search submit=false instant=settings.instant_search class='search search-full'}}
    {{/if}}

    1
  • Chris Hardy

    Thanks, Bruce.  Worked perfectly!

    0
  • Hi, I'm trying to hide search bar in my Help Center as well since I'm only using this for submission of tickets. There are no articles. I did what was suggested above :

    You can remove this helper from your home_page.hbs :
    {{search submit=false instant=settings.instant_search class='search search-full'}}

    But this didn't work. Am I missing something?



    0
  • Travis Rider

    Hey Chantal, 

    I've used the following article in the past: Setting up a requests-only (tickets-only) help center 

    Not sure if it is current but there are some tips in there that might help! Good luck!

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Hi American Hospital Association, can you share the screenshot so I can suggest you something.

     

    Thanks

    0
  • Mohd Alam Ansari

    There is not any button. I am damn sure something could be do in this code.

    {{search submit=false instant=settings.instant_search class='search search-full'}}

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Hi Alam, 

    have a look at the screenshot:

     

    the code you have shared -  {{search submit=false instant=settings.instant_search class='search search-full'}} , it's searchbar code and you are right, you will need to enable the submit button of searchbar from submit=false to submit=true.

     

    Remove your search-bar helper and add the one I'm giving:

    {{search submit=true instant=settings.instant_search class='search search-full'}}

     

    Output is:

     

     

    have any doubt  about it share that here :)

     

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Ask more questions :D

    0
  • Mohd Alam Ansari

    Thank you Ifra Saqlain. Button is showing. Ofcourse I will ask.

    0
  • Susann (Sue) Philbrook

    I used the code that hides the search bar from anyone who is not signed in. However, the magnifying glass is still showing. How do I remove (or better yet hide) the magnifying icon?

     

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Hi Susann (Sue) Philbrook, if you are using V2 theme, do the following to remove the searchbar from all who is not signed-in:

    Theme: Copenhagen (Latest Version)

    Solution 1:

    You can wrap your search-bar code inside the condition-  Theme

    API V2

    For Homepage

    {{#if signed_in}}


      <div class="hero-inner">
        <h2 class="visibility-hidden">{{ t 'search' }}</h2>
        <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
          <circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
          <path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
        </svg>
        {{search submit=false instant=settings.instant_search class='search search-full'}}
      </div>

    {{/if}}




    For Inner Pages

    {{#if signed_in}}


     <div class="search-container">
          <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="search-icon" aria-hidden="true">
            <circle cx="4.5" cy="4.5" r="4" fill="none" stroke="currentColor"/>
            <path stroke="currentColor" stroke-linecap="round" d="M11 11L7.5 7.5"/>
          </svg>
          {{search scoped=settings.scoped_kb_search submit=false}}
        </div>

    {{/if}}

     

    Solution 2:

    Add this snippet to your document_head.js file:

    <style>
    {{#if signed_in}}
      .search-icon {
      display:inline-block
      }
    {{else}}
       .search-icon {
      display:none
      }
    {{/if}}
    </style>

     

    search-icon class is in default theme, may be your theme has something else so check the class name of magnifying glass and replace search-icon class.

    Any help, feel free to ask.

    Thanks

     

    0
  • Susann (Sue) Philbrook

    Solution 1 worked perfect. Thanks!

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Great !

    0
  • Dirk Pekari

    Hi Team,

    is it possible that it has changed that customization is not longer possible within plan "Team"?

    0
  • Gabriel Manlapig
    Zendesk Customer Care
    Hi Dirk,
     
    This hasn’t changed, and Zendesk Guide theme customization is available with Suite Growth or Guide Professional and up. Please view this article as a reference: Customizing your help center theme.
     
    I hope that answers your question. Thank you!
     
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk