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:
=t('Copyright %s. ', date('Y'))?>
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.