Browser compatibility
If you added this script to your knowledge base before June 2022, we recommend updating it! The old version used a method that Chrome sometimes blocked and Firefox warned about and sometimes blocked (document.write
). We've updated the script to use a JQuery method that's better supported by all browsers.
If you're using our default theme or the Minimalist theme, your knowledge base by displays 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 © 2023 - 2024 Your Company, LLC. All rights reserved.
You might choose to keep this range or set it to the current year.
While you can manually edit the current or ending 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 Settings > Individual PDFs.
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, select Custom HTML.
- Select Body from the Select HTML section to edit dropdown.
- The copyright statement is at or near row 6:
<div class="row hg-site-body slideout-new"> [template("layout")] {{snippet.backToTop}} </div> <div class="row ko-site-footer text-center xsize"> <div>Copyright © 2023 – 2024 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
- Copy the code below and paste it in below the rest of your 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>
- You can Update Preview to see how it looks.
- 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 keep the 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 © 2023 – <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 removed the range and 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>