Tagged: footer
How do I add the year (4 digits) which updates itself every year?
Can I have the code? Thanks.
Hi Samuel,
Thanks for contacting us!
Please add following code to Functions.php file of your child theme in Appearance > Editor
function year_shortcode() {
$year = date('Y');
return $year;
}
add_shortcode('year', 'year_shortcode');
then add following shortcode in Enfold theme options > Footer > Copyright field
[year]
Regards,
Yigit
It works! Thanks.
When WordPress update to a new version, will the code still be there? Or do I have to add it again?
Hi,
If you are running a child theme, then it won’t be overwritten during theme updates.
Best regards,
Rikard
I’m not running a child theme, what can I do about it? Instead of having to add the code each time I update WordPress.
Hi,
That is exactly what a child theme is for, you should install a child theme.
Best regards,
Rikard
Okay, got it. You can close the thread.