How do I customize the Web Widget (Classic) in my help center using APIs?

If you embed the Web Widget (Classic) in your help center, customize its settings with the Web Widget (Classic) API and modify the help center document_head.hbs template file.

To add the custom Web Widget (Classic) settings:

  1. In Knowledge admin, click the Customize design icon (Customize design icon)
  2. Click the theme you want to edit to open it
  3. Click the options menu, then select Edit code
  4. In the Templates section, click document_head.hbs to modify the code
  5. Place the desired code below the first <header class="header"> line, and above the final header line

For example, to change the position of the Web Widget (Classic) in the help center, use this API setting:

<script type="text/javascript">
  window.zESettings = {
    webWidget: {
      offset: { horizontal: '100px', vertical: '150px' }
    }
  };
</script>

This is how it looks in the document_head.hbs file:

Web Widget code example in document_head.hbs
For more information to customize the Web Widget (Classic) and the help center, see

  • Advanced customization of the Web Widget (Classic)
  • Customize your help center theme
Powered by Zendesk