Workflow: How to hide the sign in button from the help center

This article explains how to remove the sign-in button from your help center so customers can still contact you. The recipe offers step-by-step instructions to customize your help center theme based on the templating versions you use and provides additional tips to ensure a seamless user experience. The workflow includes the steps below:

Expand all tabs



document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
Step 1: Remove the sign-in button
Customize the help center theme to remove the sign-in button. This process varies based on whether you use templating application programming interface (API) v1, v2, or v3.
To remove the sign-in button:


Edit the code of your help center theme

Remove the Sign in link from all help center templates.
For templating API v1 of the Copenhagen theme, delete the user_info helper from the header.hbs template.

For templating API v2, v3, and v4, delete all references or code blocks that rely on the signed_in helper, which includes the {{link "sign_in"}} helper.
For example, the block below:

&lt;ul class="user-nav-list"&gt;
&lt;li&gt;{{link 'community'}}&lt;/li&gt;
&lt;li&gt;{{link 'new_request' class='submit-a-request'}}&lt;/li&gt;
{{#unless signed_in}}
&lt;li&gt;
{{#link "sign_in" class="sign-in"}}
{{t 'sign_in'}}
{{/link}}
&lt;/li&gt;
{{/unless}}
&lt;/ul&gt;

Becomes:

&lt;ul class="user-nav-list"&gt;
&lt;li&gt;{{link 'community'}}&lt;/li&gt;
&lt;li&gt;{{link 'new_request' class='submit-a-request'}}&lt;/li&gt;
&lt;/ul&gt;


Warning: The Copenhagen theme updates periodically, so the locations of this helper are subject to change. Review the zendesk/copenhagen_theme repository.


Step 2: Configure user access
Instruct your agents to bookmark the yoursubdomain.zendesk.com/access/normal path to sign in and access the account.
Turn on single sign-on (SSO) for end users and set the remote URL to a page within your domain. This redirects customers away from the sign-in page if they find the user registration page through a direct URL.
Step 3: Remove branding from outgoing notifications
To ensure customers do not see Zendesk branding in outgoing notifications, modify the email template and remove the footer and footer_link placeholders.

Avoid the {{ticket.url}} placeholder in messages to end users because it generates a link to view the ticket in the help center.
For information about how to remove the sign-up button and turn off the ability for anyone to create tickets, see How do I remove the ability for customers to sign up to our account?

Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code, which might become obsolete over time. Zendesk can't provide support for third-party technologies such as JavaScript, jQuery, or CSS. Post any issues you have in the comments section or try searching for a solution online.