Question
Can my Help Center search results show the most recent edited date instead of the created date?
Answer
Search results can be modified to show an article's most recent edited date. This can be accomplished by editing the code within the Zendesk theme.
- In Guide, click Guide admin followed by the Customize design icon (
) in the sidebar.
- Click the theme you want to edit to open it and then click Edit Code.
- In the Templates section, select the search_results.hbs.
- Search for
date created_at
in the template and replace it byedited_at:
Make this update in the knowledge base search results for articles and in the community search results for posts.
Publish the page template after the changes you made. Your search results will now show the most recent edited date instead of the creation date.
For more information, see the article: Customizing your Help Center theme (Guide Professional and Enterprise).
3 Comments
Thanks, Nick! I've updated our article_page.hbs to show the edited date (vs the created date). Is there a way to show the user who made the edits as opposed to the original author?
Hello Danny,
Unfortunately that's not possible on the search or article page through template modifications.
I've just checked the documentation and it seems only the original author is available:
https://developer.zendesk.com/apps/docs/help-center-templates/objects#search-result-object
Also on the article page it's not available for the article itself, only for article comments:
https://developer.zendesk.com/apps/docs/help-center-templates/objects#article-object
https://developer.zendesk.com/apps/docs/help-center-templates/objects#article-comment-object (look for editor)
With kind regards,
Sebastiaan
Sparkly ⭐
Hi Nick Dushack,
Unfortunately, this update did not work for me, as although the created date is no longer showing, the date showing is an erroneous one not matching the update date on the front of the article. I have a ticket open with support if you want to review.
Please sign in to leave a comment.