Embed php for year in page
Hi there,
Is it possible to embed the following in Brizy for the year, rather than having to manually type the year? If not is there an alternative to do this?
© <?php echo date("Y"); ?>
0
-
Hi Darren,
Please try embedding this code using the Brizy Embed element. Please remove the Copyright © if you just need the year.
<style> div {text-align: center;} </style>
Copyright ©
<span id="footer-year"></span>
<img src="/error_source.jpg" style="display: none;" onerror="document.getElementById('footer-year').textContent = new Date().getFullYear();">0 -
Hi KC,
Thank you. That works a treat.
Possibly a feature to have, especially as part of the Footer template you have already?
Cheers,
Darren0
Please sign in to leave a comment.
Comments
2 comments