Lately after creating a new site with a WooCommerce plugin, one of the onboarding wizard steps allows you to install along the Storefront WooCommerce theme which is a good thing.
If you intend to keep the theme as your WooCommerce shop theme, you need to customize it. One of the most common problems of this theme is the persistent footer credit links that many users would wish to remove or replace. You may also want to add more custom features like the supported payment methods, social icons, cookie notices,s and much more.
In this post, I will show you how you can edit and remove the Storefront footer credit links and will share the code and the steps to take.
I also came up with a plugin solution since most users reading this post need a quick solution to completely customize the Storefront footer.
I am also currently working on an advanced Storefront Theme customization plugin that helps users to turn the Storefront into a premium quality WooCommerce theme.
If you do not want to edit the functions.php file or add snippets and prefer to use a plugin, I have created a plugin for you to Remove Footer Credit Links, you can find the plugin here.
Storefront Footer Credit Links
One of the things that you should do is to remove built with storefront & Woocommerce footer link that is shown in the image below:
The following are the ways you can remove the footer link on the storefront WooCommerce theme :
- Look for the store credits action hook in the template functions
- Locate the callback function of the storefront action hook
- Edit the callback function to remove the unwanted part that reads built with storefront & Woocommerce.
- Remove those parts with the apply_filters and leave the copyright and the date details in the function.
- Alternatively, you can use remove_action to remove the action
- You can also use the CSS display property to remove it by setting it to display: none
- Finally, you can use the child theme to write the new function storefront_credit() function that overrides the default theme function.
Let me explain in detail how to get each of these options working :
#1) Edit Callback Function to Remove Built With Storefront & Woocommerce Footer Link
It’s a good thing to give credit to WooCommerce and the Storefront theme but footer links will always drive traffic out of your website. If you are going to keep this theme, you need to remove built-with storefront & Woocommerce footer links.
When I installed this theme I liked its simplicity and wanted to use it for illustration in my tutorials.
For some reason, I don’t like the footer credit links and I always want to get rid of them immediately after I start theme customization.
Built With Storefront & Woocommerce Footer Link Location
When you check the footer.php you will not see this built with storefront & Woocommerce footer link.
So to remove it I knew it was added there using an action hook and would, of course, use something like remove_action.
So I immediately started searching for the action hook and it took forever to find its location but finally, I got it.
This is the callback function named storefront_credit and the location path is:
wp-content/themes/storefront/inc/storefront-template-functions.php
On the code editor, you should look for line number 129 or thereabout.
If you want to reuse the storefront theme to build a custom WooCommerce theme that you are not going to be updating, you can edit this action callback function to remove that part and replace or leave it without that credit footer link.
In this case, the code in that callback function could change to this:
if ( ! function_exists( 'storefront_credit' ) ) { /** * Display the theme credit * * @since 1.0.0 * @return void */ function storefront_credit() {?> <div class="site-info"> <?php echo esc_html( '© ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ); ?> </div><!-- .site-info --> <?php } }
The results should be to remove built with storefront & Woocommerce footer link and leave the site name, and the copyright and it should look like this:
#2) Use CSS to Remove Built With Storefront & Woocommerce Footer Link
This is the least effective method since it just hides the visibility of the footer link. You just need to find the class of the footer link using your Inspect Browser tool as shown below:
Now we just need to apply the display: none rule to the site-info class as follows:
.site-info a { display: none; }
This simply targets the footer link and hides it. We could also use the visibility rule as follows :
.site-info a { visibility: hidden; }
#3) Use remove_action to remove Woocommerce Footer Link
Remove action is another swift way to remove this footer link without causing problems with the future update of this theme.
In this case, you should add the remove footer in the child theme functions.php file. In this case, the remove_action function should be as follows:
remove_action('storefront_footer', 'storefront_credit',20);
#4) Use the Child Theme Function to Override the Footer Link
Finally, you can use copy the function to the child theme functions.php and add your own credit links or code something like this :
/** * Display custom WooCommerce shop credit message */ function storefront_credit() { ?> <div class="site-info"> <?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '© ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?> <?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?> <br /> <?php echo '<a href="https://njengah.com" target="_blank" title="' . '" rel="author">' . esc_html__( 'Built by Joe ', 'storefront' ) . '</a>' ?> and <a href="https://yourdomain.com" title="Your Company Name">Your Company Name</a>. <?php } ?> </div><!-- .site-info --> <?php }
You can replace the section with my domain and text with your respective domain name and preferred text.
Conclusion
As you can see in this post there several ways you can remove the WooCommerce footer credit link.
It depends on your goals or your programming experience. If you are a WooCommerce developer and want to use the storefront theme as a starter theme, editing directly the callback function should be the way to get this done.
I hope you can now remove built with storefront & Woocommerce footer links without any problems. If you have other WooCommerce development problems, you can always get in touch for more advice and help.
Joe is an experienced full-stack web developer with a decade of industry experience in the LAMP & MERN stacks, WordPress, WooCommerce, and JavaScript – (diverse portfolio). He has a passion for creating elegant and user-friendly solutions and thrives in collaborative environments. In his spare time, he enjoys exploring new tech trends, tinkering with new tools, and contributing to open-source projects. You can hire me here for your next project.
Similar Articles
- How to Create Shortcode for Plugin in WordPress
- How to Redirect a WordPress Page Without Plugins?
- How to Redirect Users after Successful Login in WordPress without Using a Plugin
- How to Check If Plugin is Active In WordPress [ 3 WAYS ]
- 23 Best WooCommerce Plugins for Checkout Page Customization
- How to Edit Header in Storefront WooCommerce Theme
- How to Skip Cart and Redirect to Checkout Page WooCommerce
- How to Change the WooCommerce ‘Added to Cart’ Notice
- How to Redirect to Cart after Login in WooCommerce
- How to Remove or Disable Reviews In WooCommerce
- How to Redirect User If Not Logged in WordPress » Page Redirect
- How to Remove Proudly Powered by WordPress Footer Link
- How to Move Description Under Image in WooCommerce
- How to Remove Has Been Added to Your Cart Message WooCommerce
- How to Add Default Content to Custom Post Type Editor
- How to Remove WordPress Admin Menu Items Programmatically Without Plugin
- How to Change Out Of Stock Text in WooCommerce
- How to Get Logged In User Information in WordPress
- WooCommerce Redirect after Checkout : How to Automatically Redirect to a Custom Page After Checkout
- How to Get Current User Role in WordPress & Display Roles
Comments are closed.