Closed Alex-JTI closed 3 years ago
Hi,
This is due to new sanitization on the output of the footer code (for security reasons). The best way is using a date shortcode . You could use this plugin: https://wordpress.org/plugins/current-year-shortcode/
Or if you are using a child theme you can add your own shortcode like this:
add_shortcode( 'current_year', function() {
return date( 'Y' );
} );
Then use [current_year] in your copyright text in the customizer.
Thank you very much, this did the job well!
In the version 2.0 I used to have code
<script type="text/javascript">document.write( new Date().getUTCFullYear() );</script>
that worked like a charm to output current year in the copyright footer. With the version 2.1 it doesn't.<?php echo date("Y"); ?>
doesn't work either.Can you suggest please how to archive it?