FAQs

En anglais

Oracle Micros

WordPress

Keeping your website up to date is essential for professionalism, and one small but important detail is your copyright year in the footer. Instead of manually updating it every year, you can set it up to update automatically using a simple code snippet.

Updating Copyright Year in Widgets

If your theme uses widgets, follow these steps:

  1. Navigate to Appearance > Widgets.
  2. Locate the footer widget area.
  3. Add a Custom HTML block.
  4. Insert the following code: 

    &copy; <span id="year"></span> Your Website Name. All Rights Reserved. <script> document.getElementById("year").textContent = new Date().getFullYear(); </script>
  5. Click Update and check your site to confirm the changes.

JavaScript is used here since PHP is not supported in widget areas.

Updating Copyright Year in Elementor Free

If you are using the free version of Elementor, follow these steps:

  1. Open your WordPress dashboard and go to Appearance > Widgets or Templates > Theme Builder > Footer (if your theme supports footer templates).
  2. Select the footer section and open it in Elementor.
  3. Drag and drop a Text Editor widget into your footer area.
  4. Enter the following text: 

    &copy; <span id="year"></span> Your Website Name. All Rights Reserved. <script> document.getElementById("year").textContent = new Date().getFullYear(); </script>
  5. Click Update and check your site to confirm the automatic update.

Elementor Free does not support PHP code, so JavaScript is the best way to ensure the year updates automatically.

Category: WordPress

Windows 11

Windows 10

Windows Server

Mac OS

Logiciels