0

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?

New contributor
nurulbd999 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • It might be helpful if you were to edit your question to show us the PHP code you tried adding to the theme's 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.
    – Pat J
    Commented 11 hours ago

1 Answer 1

0

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 &copy; '.date("Y").'Name goes here. All Rights Reserved.</p>';
    return $copyright;
}
add_shortcode('copyright', 'copyright_year_for_footer');
1
  • My issue is specifically for the Electro Theme. There is a Footer Credit Block but no shortcode working here.
    – nurulbd999
    Commented 16 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.