Gday Enfold users
Does anyone know a way to add a dynamic current year to the socket using a function in my child theme?
I’d prefer not to edit the footer.php file directly, nor a copy of it in the child theme (as these files at times need replacing when the parent socket files change).
A shortcode in the theme options text field would be even better, if at all possible?
cheers
Darryl
Hey Darryl!
Please add following code to Functions.php file of your child theme in Appearance > Editor
function avia_year_func( $atts ){
return date("Y");
}
add_shortcode( 'cur_year', 'avia_year_func' );
and then go to Enfold theme options > Footer and insert following shortcode into copyright field
[cur_year]
to echo current year – http://kriesi.at/documentation/enfold/change-the-footer-text-and-link/
Best regards,
Yigit
Yigit! Thanks so much, this is perfect…thanks for your prompt reply.
cheers
Darryl