Storefront Theme Hooks: A Visual Guide

Storefront Theme Hooks: A Visual Guide
On this page
  1. Why Learn Storefront's Own Hook Set
  2. Step 1: The Header Hook Sequence
  3. Step 2: Add Custom Content to the Header
  4. Step 3: The Footer and Sidebar Hooks
  5. Troubleshooting
  6. Frequently Asked Questions
  7. Conclusion

The Storefront theme hooks cover the header, footer, sidebar, and page-level structure separately from WooCommerce’s own hooks, since Storefront registers its own set of storefront_-prefixed actions for anything outside the core WooCommerce templates.

Why Learn Storefront’s Own Hook Set

  • Storefront wraps its header, footer, and sidebar in its own action hooks, distinct from WooCommerce’s product-related hooks
  • Many WooCommerce-focused tutorials don’t cover theme-level customization, which is where Storefront’s hooks come in
  • Knowing these hooks lets you customize navigation, branding, and layout without a full child theme template override

Step 1: The Header Hook Sequence

PHP
// Default Storefront header actions, in order
add_action( 'storefront_header', 'storefront_header_container', 0 );
add_action( 'storefront_header', 'storefront_skip_links', 5 );
add_action( 'storefront_header', 'storefront_site_branding', 20 );
add_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
add_action( 'storefront_header', 'storefront_product_search', 40 );
add_action( 'storefront_header', 'storefront_primary_navigation', 50 );
add_action( 'storefront_header', 'storefront_header_cart', 60 );

Step 2: Add Custom Content to the Header

PHP
/**
 * Add a promotional bar above the Storefront header
 * Add to your child theme's functions.php
 */
add_action( 'storefront_before_header', 'add_promo_bar_above_storefront_header' );

function add_promo_bar_above_storefront_header() {
    echo '<div class="promo-bar">Free shipping on orders over $75</div>';
}
Storefront theme hooks: the page before adding the code
Before
Storefront theme hooks: the page after adding the code
After
PHP
// Default footer actions
add_action( 'storefront_footer', 'storefront_footer_widgets', 10 );
add_action( 'storefront_footer', 'storefront_credit', 20 );

// Default sidebar action
add_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );

Troubleshooting

Your Snippet Doesn’t Work on a Storefront Child Theme

Confirm you’re not confusing Storefront’s own hooks with WooCommerce’s hooks — for example, removing WooCommerce’s default sidebar action won’t affect Storefront’s separately registered storefront_sidebar action.

You Need to Remove a Default Header Element

Use remove_action() with the exact same function name and priority shown in the default hook list above — a mismatched priority will silently fail to remove the element.

Frequently Asked Questions

Do these hooks work on Storefront child themes too?

Yes, since child themes inherit the parent theme’s hook structure, all of Storefront’s hooks remain available and functional in a child theme.

Are these hooks different from the WooCommerce plugin’s own hooks?

Yes, Storefront’s storefront_-prefixed hooks are separate from WooCommerce’s own hooks (like woocommerce_before_shop_loop) — the two systems work alongside each other.

Will this guide help if I’m using a different theme, not Storefront?

Only partially — other themes typically register their own custom hook names, so you’d need to find that specific theme’s own hook documentation instead.

Conclusion

Storefront theme hooks give you a structured way to customize the header, footer, and sidebar without overriding full template files, complementing the separate set of WooCommerce product hooks. Keep the two hook systems distinct in your mind, since mixing them up is a common source of confusion when customizing a Storefront-based store.

See also How to Install and Configure the Storefront Theme for WooCommerce. Then read How to Customize the Storefront Theme Without Writing Code.

Running a WooCommerce store? All-in-One Utilities Woo Add-on adds over 50 WooCommerce features, so you can switch them on without code.

Leave a Reply

Schedule a call