functions.php<\/em> file in Divi, or just copy what I've got below.<\/p>\n\n\n\nThe default for this function is:<\/p>\n\n\n\n
function et_get_footer_credits() {\n $original_footer_credits = et_get_original_footer_credits();\n\n $disable_custom_credits = et_get_option( 'disable_custom_footer_credits', false );\n\n if ( $disable_custom_credits ) {\n return '';\n }\n\n $credits_format = '<%2$s id=\"footer-info\">%1$s<\/%2$s>';\n\n $footer_credits = et_get_option( 'custom_footer_credits', '' );\n\n if ( '' === trim( $footer_credits ) ) {\n return et_get_safe_localization( sprintf( $credits_format, $original_footer_credits, 'p' ) );\n }\n\n return et_get_safe_localization( sprintf( $credits_format, $footer_credits, 'div' ) );\n}<\/code><\/pre>\n\n\n\nThe line we care about is:<\/p>\n\n\n\n
$footer_credits = et_get_option( 'custom_footer_credits', '' );<\/code><\/pre>\n\n\n\nThat line pulls in the text from the Footer Credits in the Theme Customizer.<\/p>\n\n\n\n
To get to the text, in the admin area go to Divi -> Theme Customizer<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nGo to Footer<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nSelect Bottom Bar<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nAnd you'll see the text in the Edit Footer Credits<\/em> box.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nWith the default code, it will literally put whatever you have in that box into your footer.<\/p>\n\n\n\n
The php code to insert the current year, automatically updated when the year changes, is:<\/p>\n\n\n\n
date_i18n('Y')<\/code><\/pre>\n\n\n\nThere is a lot of extra code in the et_get_footer_credits()<\/em> function that you won't need. It handles if you check the \"Disable Footer Credits\" box or leave the Footer Credits box empty.<\/p>\n\n\n\nFor the sake of consistency, I usually leave the rest of the code in the function and just edit this line:<\/p>\n\n\n\n
$footer_credits = et_get_option( 'custom_footer_credits', '' );<\/code><\/pre>\n\n\n\nTo this:<\/p>\n\n\n\n
$footer_credits = \"Copyright © \" . date_i18n('Y') . \" \" . et_get_option( 'custom_footer_credits', '' );<\/code><\/pre>\n\n\n\nThat produces Copyright \u00a9 2020, followed by whatever I put in the Footer Credits box.<\/p>\n\n\n\n
© is the html symbol for \u00a9.<\/p>\n\n\n\n
Putting a period in between strings in php joins them together. Don't forget to add spaces with \" \".<\/p>\n\n\n\n
Make sure you remove the first part from the Footer Credits, so you don't double up the Copyright text.<\/p>\n\n\n\n
Edit the Footer Credits, then hit \"Publish\".<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nWhen you refresh the page, you should see your current year in the footer, followed by whatever else you put in there.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nOther ways to customize<\/h2>\n\n\n\n If you use the same footer on every site you build, you might want to change the whole $footer_credits<\/em> line to reflect that.<\/p>\n\n\n\nMany web designers will do something like:<\/p>\n\n\n\n
Copyright \u00a9 2020 Bill's Plumbing | Web Design by Intelliwolf<\/a><\/p>\n\n\n\nThe way you'd do that dynamically, without having to change it for every site, is:<\/p>\n\n\n\n
$footer_credits = \"Copyright © \" . date_i18n('Y') . \" \" . get_bloginfo('name') .\n\" | <a href='https:\/\/intelliwolf.com' rel='nofollow'>Web Design by Intelliwolf<\/a>\";<\/code><\/pre>\n\n\n\nget_bloginfo('name')<\/em> will pull the name of the website in, so you never have to touch that.<\/p>\n\n\n\nIf you want to further reduce the code down, including the above, you might want to do:<\/p>\n\n\n\n
function et_get_footer_credits() {\n\n $credits_format = '<%2$s id=\"footer-info\">%1$s<\/%2$s>';\n\n $footer_credits = \"Copyright © \" . date_i18n('Y') . \" \" . get_bloginfo('name') .\n \" | <a href='https:\/\/intelliwolf.com' rel='nofollow'>Web Design by Intelliwolf<\/a>\";\n\n return et_get_safe_localization( sprintf( $credits_format, $footer_credits, 'div' ) );\n}<\/code><\/pre>\n\n\n\nAnd that's my take on how to add the current year to the Divi footer. Let me know if you've found it useful or how you might improve upon it.<\/p>\n","protected":false},"excerpt":{"rendered":"
On all the websites I build, I put a “Copyright \u00a9 2020” in the footer, where the year gets automatically updated. The site that I was just working on had “Copyright 2018” in the footer. It was following the way Elegant Themes said to do it. No one wants to have to go in and<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[16],"yoast_head":"\n
How To Add Current Year To Divi Footer<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n