07455 744 454 info@digitalsmithy.co.uk

Divi recently changed their footer code making it harder to modify. Happily they use what’s called ‘pluggable’ functions, which can easily be overwritten.

With the new code it’s possible to add a function to customise the footer, so you no longer have to maintain custom theme files across all your sites.

This code needs to go in FUNCTIONS.PHP in order to override the pluggable function it replaces.

function et_get_original_footer_credits() {
	$dsdate = date("Y");
	return sprintf( __( 'Designed by %1$s | © 2010 - %2$s', 'Divi' ), 'Digital Smithy', $dsdate );
}

Notes

Best practice if you’re going to modify FUNCTIONS.PHP is to create a child theme. Then add the function to a new FUNCTIONS.PHP in there.

If you need to know how to create a child theme etc. Google it. I hate articles that bore on for hours before giving you the code you need, so I just provide what it says in the title.

%1$s

says ‘ replace me with the first thing after the closing bracket’.

%2$s

second thing and so on. You can easily add more and just separate the contents of each variable with commas, and enclose them in ” – as above.

$dsdate = date("Y");

Simply sets the date using a standard PHP call. It should be fairly obvious how to change the code to link to your own site.

Warnings

There are actually two ‘operations’ in the DIVI footer credits, one to get the default footer and one to get the info in CUSTOMIZER if it’s set.

Here I’ve replaced the default credits. If you then change the credits in the customizer, you’ll lose these changes.

To prevent this you’d have to force the footer credits to be disabled. Anyone knows how to do that, please let me know.

Get In Touch

I'm happy to talk over what you need. If I don't have the solution I'll advise you on who might, or what you can do next.

New Field

12 + 14 =

07455 744454

I manage social media for several clients and lack the will to also run my own. There are reviews but I rarely ever post anything.

%d bloggers like this: