top of page
Anchor 1
Last Updated on :  
Wednesday 2 February, 2022

Display Current Year - Footer & Copyright

You might wonder how to keep copyright year auto-updated right?


WixCodable has solution to that for you 😉

Video Tutorial




With the following code, you can add Copyright Symbol, Current Year which will update on its own along with giving URL to your website's name.

The Code

Enter the code given below in masterPage.js

 

$w.onReady(function () {

    const originalHtml = $w('#footerCopyright').html;

    console.log(originalHtml);

    const indexToInsertRel = originalHtml.indexOf('VictoryTales.com');
    const year = new Date().getFullYear();

    $w('#footerCopyright').text = `© ${year}`;

    const newHTML = originalHtml.substring(0, indexToInsertRel) + `<p style="text-align:center; color: #C7C7C7; font-size: 15px;"> © ${year}<a href="http://www.wixcodable.com"> WixCodable.com </a> | All Rights Reserved</p>`;

    console.log(newHTML);

    $w('#footerCopyright').html = newHTML;

});
Logo_edited.png
Disclaimer

Our free and premium content is non-exclusive, meaning you are not the only one with access to the content. You can customize our content to fit your end product. Redistribution of our content is strictly prohibited. This means you cannot make our content available to others as-is, stand-alone products, or stock products in ANY LANGUAGE, regardless if you offer our content for free or not.

© 2025 WixCodable.com | All Rights Reserved

bottom of page