Streaming live at 10am (PST)

Year change automatically for year in the footer


How do I have the year change by default with the year changes in the footer of my website?



1 Like

Hey @nathanphilsteele,

First let’s split that footer text in two parts:

Part 1: “Copyright © "
Part 2: " Blue Lake Creative. All Rights Reserved.”

Now set the footer text to display: inline so they align nicely in one row (you’ll also have to set the footer to text-align: center.)

Drag in an Embed field right in between the two footer text parts, Add this snippet and give the Embed the same class as footer text.

<script type="text/javascript">
  document.write(new Date().getFullYear());

That should do the trick! It will now refresh the year browser-side, depending on the user’s time settings.
Let me know if you need any help!


Thanks @SidneyOttelohe!

I know waaay too many websites who could use this wonderful code. Awesome, simple guide @SidneyOttelohe



1 Like

@ctrav Haha oh man don’t even get me started. :smiley:

@nathanphilsteele You could also use this code you can customize, skip the first few steps and just drag in an Embed.

Copyright &copy; 2015<script>new Date().getFullYear()>2015&&document.write("-"+new Date().getFullYear());</script>, Your Company Details.


Hi @SidneyOttelohe,

The correct year is being pulled in like it should which is awesome!

I do have a couple of questions though:

  1. How do you center the footer text?
  2. How do I keep it from getting weird space in between in mobile portrait view?



Hi @nathanphilsteele!

Select your footer section, go to typography and select text align.
For point 2 though, I’m not seeing any weird spaces on mobile, could you elaborate on this?

1 Like

Hi @SidneyOttelohe,

  1. Good to go
  2. screenshot below



Yes that’s not looking smooth at all. :stuck_out_tongue:

Try this:

Delete that footer text and embed,
Drag in a new embed and add this script:

Copyright &copy; 2015<script>new Date().getFullYear()>2015&&document.write("-"+new Date().getFullYear());</script>, Blue Lake Creative. All Rights Reserved.

That should make things a bit easier!


That did it! Good to go! Thanks @SidneyOttelohe!



1 Like

Awesome, glad I could help!