Posted on

Customize the Footer Credits in Storefront

Have you noticed that in the Storefront theme there are footer credits for the theme itself and WooCommerce?

It is possible to hide those credits from the Customizer in the Footer section, but it’s nice to keep them around to support the developers. It might be useful though to add your company name as well or change the text to something else that you prefer.

You can do it, as always, via custom code!

This time it’s not a simple snippet though. The only filter that we have for the footer credits is storefront_credit_link, but this one is used to simply hide the entire thing.

We don’t want to do that, also because we have an option for it. We have to use a different method.

Did you know that many of the Storefront functions are pluggable? What does it mean? It means that you can declare a function with the same name of the one included in the theme/plugins without creating a fatal error, and your function will completely replace the one from the core.

The name of the function that prints the footer credits is storefront_credit and you can find it in /wp-content/themes/storefront/inc/storefront-template-functions.php on line 125.

Let’s replace it. Open your functions.php file in wp-content/themes/your-child-theme-name/ and add this code at the end of the file:

This snippet will add a link to your company after the default footer credits. All this is done where you see this code:

by <a href="https://yourdomain.com" title="Your Company Name">Your Company Name</a>.


Just replace these data with your company’s data or anything you prefer, and you’re done!

Leave a Reply
You have to agree to the comment policy.