Back to Community

Troubleshooting Missing Headers and Footers in Twenty Twenty-Four WooCommerce Templates

15 threads Sep 9, 2025 ThemeTwenty twenty-four

Content

Many users of the Twenty Twenty-Four theme have encountered a specific and confusing issue: the header and footer suddenly disappear from WooCommerce pages like the Shop or Single Product view. This problem is particularly common after creating a child theme. This guide will explain why this happens and walk you through the most effective solutions.

Understanding the Problem: The "Template Part Unavailable" Error

The core of this issue often lies in how the Full Site Editor (FSE) and child themes interact with WooCommerce template parts. When you create a child theme, it generates its own set of templates. If these new templates do not correctly reference the necessary header and footer template parts, those elements will not render on the front end of your site.

You might see a message like "The template element has been deleted or is not available: header" when debugging is enabled. Crucially, the header and footer often still appear correctly within the Site Editor, making the problem even more perplexing. This confirms the issue is not with the template parts themselves, but with the connection between the WooCommerce page templates and those parts.

Most Common Solutions

Solution 1: Reassign Template Parts in the Site Editor (Recommended First Step)

This is the most common fix and should be your first attempt.

  1. Navigate to Appearance → Editor (this opens the Full Site Editor).
  2. In the Editor, click on the Browse button (usually represented by a grid icon) to view all templates.
  3. Locate and select the problematic template (e.g., Single Product or Product Catalog).
  4. Within the template editor, look for the Header and Footer blocks. You can use the List View for a clearer hierarchy.
  5. Click on the Header block. In the block settings on the right, ensure it is pulling from the correct template part (e.g., "Header"). Sometimes this connection can become undefined.
  6. Repeat this process for the Footer block.
  7. Save your changes and check the front end of your site.

Solution 2: Reset the WooCommerce Templates

WooCommerce can sometimes install its own default templates that conflict with the theme's intended design. Resetting them forces WooCommerce to use the theme's templates.

  1. Go to WooCommerce → Status → Tools.
  2. Find the tool labeled Clear template cache and click Clear.
  3. This will remove any cached template versions. WooCommerce will then reload the templates from your active theme (Twenty Twenty-Four or your child theme).

Solution 3: Check for a Missing WooCommerce Support Declaration

Some users have reported that explicitly declaring WooCommerce support in their child theme's functions.php file resolved similar issues. This is a simple code addition.

  1. Access your child theme's files, specifically the functions.php file.
  2. Add the following code snippet at the end of the file:
    add_action( 'after_setup_theme', 'tt4_child_woocommerce_support' );
    function tt4_child_woocommerce_support() {
        add_theme_support( 'woocommerce' );
    }
  3. Save the file and upload it to your server, overwriting the old one.

Important: Always use a child theme when modifying theme files. Editing the parent theme directly will cause your changes to be lost when the theme is updated.

Conclusion

The disappearance of headers and footers on WooCommerce pages in the Twenty Twenty-Four theme is almost always a template mapping issue, not a bug in the theme itself. By following the steps above—starting with reassigning parts in the Site Editor—you can almost always resolve the problem and restore your site's complete layout.

Related Support Threads Support