Browser compatibility
If you added this script to your knowledge base before June 2022, we recommend updating it! The old version used the document.write method, which Chrome sometimes blocked and Firefox warned about and sometimes blocked. We've updated the script to use a JQuery method that's better supported by all browsers.
There is now a merge code for this
As of September 2026, you can put 2026 in your footer instead of the script below. It resolves to the current four-digit year every time the page loads and needs no JavaScript. Knowledge bases created after September 2026 already use it in their default footer.
Use the script below if you want a year range, such as 2024 to the current year, or if you would rather not change your existing footer HTML.
Most knowledge bases display a footer with a copyright year.
The years used will depend on when you created your knowledge base and whether you've manually edited it.
For example, if you've created your knowledge base recently, the default Custom HTML for your knowledge base's footer will set the Copyright to: Copyright © 2026 KnowledgeOwl. All rights reserved.
Most often, authors either keep this single year or set it to a range.
While you can manually edit the year, that can be a bit of a pain to remember to update. Here's a quick custom HTML change you can add to make it so you never have to update your copyright year again.
PDF limitations
This script will not work in the PDF Footer for Customize > PDF.
- Go to Customize > Style (HTML & CSS).
- In the Customize HTML, CSS, and JS section, select Custom HTML.
- In the Select HTML section to edit dropdown, select Body.
- The copyright statement is at or near row 6:
- Copy the code below and paste it in below the rest of your Body Custom HTML:
<!-- Get current year for copyright statement --> <script> $('#spanYear').html(new Date().getFullYear()); </script> - Once you've done that, find the year portion of your copyright statement that you'd like to autoupdate. Replace that year with this code:
<span id="spanYear"></span> - Once you're happy with how your dates look, be sure to Save your changes.
For example, here's what the HTML might look like if we chose to use a year range:
<div class="row hg-site-body slideout-new">
[template("layout")]
{{snippet.backToTop}}
</div>
<div class="row ko-site-footer text-center xsize">
<div>Copyright © 2024 – <span id="spanYear"></span> Your Company, LLC. All rights reserved.
<br>Made with <a href="https://www.knowledgeowl.com" target="_blank">KnowledgeOwl</a> <img class="ko-logo" src="https://dyzz9obi78pm5.cloudfront.net/app/image/id/65cbb573a7123f123624c722/n/favicon-32px.svg">
</div>
</div>
<!-- Get current year for copyright statement -->
<script>
$('#spanYear').html(new Date().getFullYear());
</script>
And here's what it might look like if we kept it to a single year:
<div class="row hg-site-body slideout-new">
[template("layout")]
{{snippet.backToTop}}
</div>
<div class="row ko-site-footer text-center xsize">
<div>Copyright © <span id="spanYear"></span> Your Company, LLC. All rights reserved.
<br>Made with <a href="https://www.knowledgeowl.com" target="_blank">KnowledgeOwl</a> <img class="ko-logo" src="https://dyzz9obi78pm5.cloudfront.net/app/image/id/65cbb573a7123f123624c722/n/favicon-32px.svg">
</div>
</div>
<!-- Get current year for copyright statement -->
<script>
$('#spanYear').html(new Date().getFullYear());
</script>