# `generoi/sage-woocommerce`: Header + footer in layout

**URL:** https://discourse.roots.io/t/generoi-sage-woocommerce-header-footer-in-layout/26514
**Category:** sage
**Tags:** sage10, woocommerce
**Created:** 2024-01-07T18:02:03Z
**Posts:** 7

## Post 1 by @strarsis — 2024-01-07T18:02:03Z

When I use `generoi/sage-woocommerce` for WooCommerce support in Sage 10,  
the products archive and single Blade-PHP/Sage templates are added:

> <https://github.com/generoi/sage-woocommerce/blob/c49760aa435a312f465bb934ff8fd03e98c69e42/publishes/resources/views/archive-product.blade.php>

[https://github.com/generoi/sage-woocommerce/blob/c49760aa435a312f465bb934ff8fd03e98c69e42/publishes/resources/views/single-product.blade.php](https://github.com/generoi/sage-woocommerce/blob/c49760aa435a312f465bb934ff8fd03e98c69e42/publishes/resources/views/single-product.blade.php)

The normal Sage theme header and footer are not added though, although the both templates extend from `layouts.app`. It appears that some of the WooCommerce-related functions output the header and footer markup in the content of the layout instead.

---

## Post 2 by @ben — 2024-01-08T17:16:33Z

> [@strarsis](#):
>
> The normal Sage theme header and footer are not added though

Odd :thinking: I’m using `generoi/sage-woocommerce` on a production site and not running into this issue

I also have two different test setups, one with just stock Sage with `generoi/sage-woocommerce` and one with Radicle with `generoi/sage-woocommerce` and I can’t reproduce this issue on any of the setups

---

## Post 3 by @Log1x — 2024-01-08T19:01:51Z

Are you already using [🎨 Move default theme markup to the `app` layout by Log1x · Pull Request #3167 · roots/sage · GitHub](https://github.com/roots/sage/pull/3167)?

It’s possible it broke support with this somehow since the app layout changed. I can try to put a project together to test/tinker tonight if needed.

---

## Post 4 by @csorrentino — 2024-01-09T21:32:27Z

@Log1x I just pulled in those changes to a sage project with generoi/sage-woocommerce and, so far, I’m not running into this issue.

---

## Post 5 by @strarsis — 2024-01-09T23:08:28Z

> [@Log1x](#):
>
> Are you already using [:art: Move default theme markup to the `app` layout by Log1x · Pull Request #3167 · roots/sage · GitHub](https://github.com/roots/sage/pull/3167)?

I pulled those changes but still have the issue. I create a minimal reproducible sample for that.

---

## Post 6 by @Log1x — 2024-01-10T04:19:28Z

Thanks for verifying!

I do not use WooCommerce so someone else will have to look into why this is happening if it is not directly related to recent changes to Sage/Acorn.

---

## Post 7 by @strarsis — 2024-01-10T11:41:23Z

So while preparing the reproducible sample I found the reason (of course…).  
This piece of PHP caused it :roll_eyes: :

```
add_action('get_sidebar', function () {
    do_action('woocommerce_sidebar');
}, 10, 0);
```
