In Electro Wordpress theme there is no option to auto-update the year. Adding additional PHP code in functions.php is not working here. How can I do this?
1 Answer
FWIW, I use this functions.php code in my own custom themes. I implement with a shortcode block in my footer template pattern:
/*----------------------------------------------------------*
* Shortcode for copyright [copyright]
*----------------------------------------------------------*/
function copyright_year_for_footer ( $atts ) {
$copyright = '<p class="copyright">Copyright © '.date("Y").'Name goes here. All Rights Reserved.</p>';
return $copyright;
}
add_shortcode('copyright', 'copyright_year_for_footer');
-
My issue is specifically for the Electro Theme. There is a Footer Credit Block but no shortcode working here. Commented 16 hours ago
functions.php
file. However, it's also possible you'll need to ask the theme's support team about this; third-party theme support is off topic here.