Technology

2025 Called and they want their Footer Back

It's the start of a new year, and if you're anything like me, you're scrambling to check off all those tasks you conveniently ignored in December.

But one task you shouldn't have to worry about? Updating the year in your website's footer.

Too often, developers hardcode years directly into their code. It’s easier at the time but it makes your website harder to maintain by yourselves and requires you to have to follow up every January (while you promise to fix the problem before next year)

Instead, let computers do what they're good at: knowing what year it is.

Here are a few quick ways to make your footer update automatically, depending on your platform:

Squarespace

In a Code Block, add:

<script>document.write(new Date().getFullYear());</script>  

This is vanilla javascript and will work for any website where all you can do is update some HTML and javascript.

WordPress

In your theme's `footer.php`:

© <?php echo date("Y"); ?> Your Company Name 

Django

In your template:

© {% now "Y" %} Your Company Name  

Ruby on Rails

In your view:

© <%= Time.current.year %> Your Company Name  

If all of this feels too technical, or too daunting (like committing to 75 Hard starting on January 1st) Carbon is here to help. Let's make sure you start the year off right, and *in* the right year.

Christopher Mallon

Director of Technology


Christopher has over 10+ years working on a wide range of digital products from WordPress sites, to Shopify, to custom Django applications. In the past, he has helped to scale digital reach at a variety of EdTech startups and launching a variety of eCommerce brands. Christopher loves hearing about your internal processes and finding better ways to automate and scale those efforts.

When he isn't busy working on your tech needs, he spends his time with his two beautiful daughters and wife in Portland, Maine.

Create a reaction

We are a full-service digital and brand strategy agency. We help businesses grow through strategic branding, web design, and digital marketing.