Hide Search bar in help Center home page

Con risposta


Data ultimo post: 23 giu 2020

HI,

is it possible to hide search bar in Help Center homepage ?

I have no article in Guide, so I'm using only ticket form.

My goal, at the moment, is to use home page only as landing for ticket submission, a thank you page with a link to my website, placing some text and link

Is there a way to achieve it ?

Thanks a lot

 

 


0

22

22 commenti

Hi Support Team,
I cant find {{search submit=false instant=settings.instant_search class='search search-full'}} in home_page.hbs
Can you please help me locate it.
I also need to remove the maginifying glass icon in top right of header. 

0


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


Hi Team,

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

0


Great !

0


Solution 1 worked perfect. Thanks!

0


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


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


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

0


Ask more questions :D

0


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


Accedi per aggiungere un commento.

Non hai trovato quello che cerchi?

Nuovo post