Home › Forums › WoodMart support forum › Display Current Year in Footer › Reply To: Display Current Year in Footer
December 31, 2019 at 6:29 am
#165688

Aizaz Imtiaz Awan
Keymaster
Hello,
To display the dynamic year in footer you can use the below code in function.php :
function year_shortcode() {
$year = date('Y');
return $year;
}
add_shortcode('year', 'year_shortcode');
After placing the above code you have to use this short code “[year]” inside “Copyrights text” area, under theme settings >> Footer.
Screenshot for clarification: https://jmp.sh/sUKHtFb
I have tested this code on my test site and it works just perfectly fine on my test site.
Best Regards.