Code Snippets

Apply a coupon for minimum cart total

The code snippet below allows you to: Show a notice on the cart and checkout page, reminding customers that they get a discount if spending more than a minimum amount. […]

Hide trailing zeros on prices

The option to show trailing zeros on your prices has been removed in favor of a filter, as of WooCommerce 2.2x. If you want to hide trailing zeros on your […]

Notify Admin When New Account Is Created

Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code […]

Display product weight on archive pages

To display WooCommerce product¬†weight on archive pages, below the title of the product,¬†add this code to your child theme’s functions.php file or via a plugin that allows custom functions to […]

Customize links in the handheld footer bar

Customizing the links in the handheld footer bar is fairly straightforward and handled via the storefront_handheld_footer_bar_links filter. Removing a link Using the following snippet would remove all links. Pick and […]

Remove the handheld navigation bar

Storefront 2.0 introduced a navigation bar to the responsive design, including links to the account section, search form and cart. To remove this feature, use this snippet: This file contains […]

Add static content to the Storefront header

Adding static content to the Storefront header requires hooking a function that outputs your content into storefront_header. You can control the position of the markup via the priority set. For […]

Create a social icon menu

Storefront’s secondary navigation menu location is ideally positioned to display links to your social media profiles with instantly recognizable icons. This modification automatically replaces links to popular social networks with […]

Loading…

Something went wrong. Please refresh the page and/or try again.