The Popular Search Terms extension allows you to display a curated list of search keyword suggestions to users in order to help them find helpful content. When a user clicks on a keyword they are taken to the Search Results page to view results for that keyword.
The Popular Search Terms extension is bundled into all of our themes by default, so you can start using it straight away. It builds upon our powerful micro-templating system and gives you full control over how the search terms look and behave.
Our themes allow you to add a list of popular search terms on the Home page using theme settings.
-
In Zendesk Guide, click the Customize design icon () in the sidebar.
-
Click Customize on the theme you want to edit.
-
Expand the Home page elements section select a style from the Popular keywords style setting dropdown list. You can add an optional heading using the Popular keywords heading setting.
-
Add one or more search terms to the Popular keywords setting in a comma-separated list.
If you’d like to display the list of popular search terms outside of the Home page hero section, you can copy-and-paste the following HTML and JavaScript code into your desired position:
{{#if settings.popular_keywords}}
<div id="popular-keywords">
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', () => {
Util.renderTemplate(document.getElementById('popular-keywords'), 'popular-keywords', {
keywords: '{{#if settings.use_translations}}{{dc settings.popular_keywords}}{{else}}{{settings.popular_keywords}}{{/if}}'
});
})
</script>
</div>
{{/if}}
Custom micro-templates
Each theme comes with a number of built-in styles that you can choose from using the Popular keywords style theme setting, but you can add additional styles to your theme by:
- Editing the micro-template of your chosen style on the
footer.hbs
template. - Copying a style across from another theme if you purchased our Complete Package.
- Copying a style from our Pattern Library.
All popular search term micro-templates use the same keyword list defined in theme settings but can differ significantly in terms of their look-and-feel and behavior.