How to Automate the Copyright Year

Dec 27, 2024

Updating your copyright year automatically is still simple. Here’s how to do it step by step:

1. Navigate to Your Theme Files

Log in to your server or hosting platform using your preferred file manager or SFTP client. Locate your theme’s folder. This is typically found at:

application/themes/yourtheme/elements/footer.php

2. Edit the Footer File

Open the footer.php file in a text editor or your IDE. Look for the section where your copyright information is displayed. It might look something like this:

© 2023 Your Company Name. All rights reserved.

3. Replace the Static Year with Dynamic PHP Code

Replace the static year (2023 in this example) with the following dynamic PHP snippet:


  
  Concrete CMS.') ?>

    

This code automatically fetches the current year using PHP’s date('Y') function. The t() function ensures the text is translatable if your site supports multiple languages.

4. Save Your Changes

Save the footer.php file and upload it back to the same location on your server if necessary.

5. Clear your cache and Test Your Changes

Clear your site cache from the Concrete CMS dashboard under System & Settings > Optimization > Clear Cache. Refresh your website and verify that the footer now displays the current year.

Recent Tutorials
How to Automate the Copyright Year
Dec 27, 2024

Learn how to keep your website's copyright year updated automatically in Concrete CMS.

How to change the path of a group of pages
Dec 23, 2024
By myq.

Change the canonical path without breaking things

Bi-directional Express associations
Dec 18, 2024
By myq.

Set up associations between Express entries in both directions

Display Express Data Across Multiple Sites
Dec 17, 2024
By myq.

A guide to configuring Express entities and the Express Entry List block to ensure proper data display across multiple sites.

Customize locale icons
Oct 29, 2024
By myq.

How to customize locale (language region) flags

Concrete CMS Caching Guide
Oct 16, 2024

An overview of types of caching in Concrete and considerations when using them.

Improvements?

Let us know by posting here.